Skip to content

gaurav-jo1/secure-state-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

211 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure State Engine 🏢

Welcome to Secure State Engine, a full-stack portfolio project demonstrating a production-grade online shopping system. This end-to-end platform goes beyond basic demos, featuring robust authentication (including signup, login, password reset with email validation), Google OAuth integration, user-specific persistent shopping carts, a polished React UI, and a scalable architecture with Docker, PostgreSQL for data persistence, Redis for caching, and a Python backend.

Key highlights:

  • Secure User Flows: Complete auth/authorization with email-based recovery and validation codes.
  • Seamless Experience: Persistent carts tied to user sessions, smooth OAuth handoffs.
  • Production-Ready: Dockerized for easy deployment, modern stack for scalability.

Screenshot from 2024-07-10 08-36-34

Screenshot from 2024-07-10 08-26-37

Getting Started 🔥

Follow these steps to set up and run the project locally:

  1. Clone the repository:

    git clone https://github.com/gaurav-jo1/secure-state-engine
  2. Navigate to the project directory:

    cd secure-state-engine
  3. Install frontend dependencies:

    cd frontend && npm install
    cd ..
  4. Set up backend environment (optional for non-Docker dev):

    • Create and activate a virtual environment:
      cd backend
      python -m venv venv
      source venv/bin/activate  # On Windows: venv\Scripts\activate
      pip install -r requirements.txt
      cd ..
  5. Configure Google OAuth (optional for enhanced login):

    • Create a project in the Google API Console.
    • Enable the Google+ API and create OAuth 2.0 credentials (Web application type).
    • Add authorized origins (e.g., http://localhost:5173) and redirect URIs (e.g., http://localhost:5173/auth/callback).
    • Download the client_secret.json and place it in the frontend directory.
    • For a step-by-step guide, watch this YouTube tutorial.

    client_json_img

  6. Update environment variables:

    • In backend/.env, add:
      GOOGLE_CLIENT_ID=your_google_client_id_here
      # Add other vars like DB credentials if needed for custom setup
      
  7. Run the application with Docker:

    docker compose up --build

    This spins up all services (frontend, backend, Postgres, Redis, Redash) in containers.

Access the Application

Troubleshooting

  • Ensure Docker and Docker Compose are installed.
  • For port conflicts, edit docker-compose.yml.
  • If using the virtualenv backend setup, run uvicorn main:app --reload in the backend dir.

Contributing

Feel free to fork, raise issues, or submit PRs for improvements. This project is designed as a showcase but welcomes enhancements!

Thanks for checking out Secure State Engine—a testament to building deployable, full-featured systems! 🚀

About

Seamless online shopping experience, it offers a robust and efficient platform for modern e-commerce.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors