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.
Follow these steps to set up and run the project locally:
-
Clone the repository:
git clone https://github.com/gaurav-jo1/secure-state-engine
-
Navigate to the project directory:
cd secure-state-engine -
Install frontend dependencies:
cd frontend && npm install cd ..
-
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 ..
- Create and activate a virtual environment:
-
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.jsonand place it in thefrontenddirectory. - For a step-by-step guide, watch this YouTube tutorial.
-
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
- In
-
Run the application with Docker:
docker compose up --build
This spins up all services (frontend, backend, Postgres, Redis, Redash) in containers.
- Frontend: Open http://localhost:5173 in your browser.
- Backend API: Available at http://localhost:8000 (e.g., for docs at
/docs).
- Ensure Docker and Docker Compose are installed.
- For port conflicts, edit
docker-compose.yml. - If using the virtualenv backend setup, run
uvicorn main:app --reloadin the backend dir.
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! 🚀


