Skip to content

LowPolyCat1/gameshop

Repository files navigation

Contributors Forks Stargazers Issues project_license


Logo

GameShop

An Example Project

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This project is a demonstration of an Identity and Access Management (IAM) system built with Rust. It showcases various security features and best practices, including:

  • Secure password handling (hashing) using Argon2id with salt
  • User data encryption and decryption with ChaCha20-Poly130
  • Configuration via environment variables

The project uses Actix-web for building the server and provides basic endpoints for user registration and health checks. It also includes modules for database interaction, encryption, hashing, and logging.

Note: This project is purely a demonstration and is not intended for production use.

In addition the project also shows fundamental understanding of databases and front end web technologies.

(back to top)

Built With

Rust Reqwest Tokio Serde

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Rust
  • Cargo

Installation

  1. Clone the repo

    git clone https://github.com/lowpolycat1/gameshop.git
  2. Rename the env_example file to .env and change the settings

    SERVER_IP = "0.0.0.0"
    SERVER_PORT = "8080"
    DOCKER_EXPOSED_PORT = "8080"
    DATABASE_PATH = "rocksdb:/var/lib/surrealdb"
    ENCRYPTION_KEY = "00000000000000000000000000000000"
    DATABASE_NAMESPACE = "test"
    DATABASE_NAME = "test"
    
  3. Build the project

    cargo build --release
  4. Run the project

    cargo run --release

(back to top)

Docker

  1. Clone the repo

    git clone https://github.com/lowpolycat1/gameshop.git
  2. Rename the env_example file to .env and change the settings

    SERVER_IP = "0.0.0.0"
    SERVER_PORT = "8080"
    DOCKER_EXPOSED_PORT = "8080"
    DATABASE_PATH = "rocksdb:/var/lib/surrealdb"
    ENCRYPTION_KEY = "00000000000000000000000000000000"
    DATABASE_NAMESPACE = "test"
    DATABASE_NAME = "test"
  3. Build the project

    docker build -t gameshop .
  4. Run the project

    docker run -d -p {SERVER_IP}:{SERVER_PORT}:{DOCKER_EXPOSED_PORT} gameshop

Python Script

Alternatively you can simply run the python script

Note: Docker is building this in --release mode: this may take A GOOD WHILE (10+ min) if you want this to be faster you can remove the --release in the Dockerfile

(back to top)

Usage

This is a demonstration of the project and can be used as a foundation to build upon. Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Secure config management using .env
  • Password hashing using Argon2
  • Data encryption using ChaCha20-Poly130
  • API endpoints
    • /register
    • /login
    • /change_username
    • /change_password
  • Portability via Docker
  • JWT Token authentication
  • Rate limiting
Maybes
  • HTTPS everywhere for data in transit
  • Implementing database Migration service
  • API endpoints
    • /change_email
    • /reset_password
  • Using a Cryptographically secure RNG

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Note: This project is not actively maintained.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors

contrib.rocks image

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

lowpolycat1

Project Link: https://github.com/lowpolycat1/gameshop

(back to top)

Images

Index Login Privacy Signup

About

An Example Front end for IAM

Topics

Resources

License

Stars

Watchers

Forks