Full-stack e-commerce demo with product browsing, cart, checkout, authentication, and reviews.
- Product catalog + product detail pages
- Guest + authenticated cart
- User auth (sign up / sign in) + password reset email flow
- Stripe Checkout session creation + webhook handling
- Order history + reviews
- Frontend: React (Vite), Material UI, Apollo Client
- Backend: Node.js, Express, Apollo Server (GraphQL)
- Database: PostgreSQL (via Sequelize)
- Payments: Stripe
cd backend
npm install
npm run devBy default the server runs on http://localhost:5000 and GraphQL is served at /graphql.
cd frontend
npm install
npm run devFrontend runs on http://localhost:5173 by default.
Note: this repo ignores
.env*files. Do not commit secrets.
DATABASE_URL: Postgres connection string (recommended)DB_USER,DB_PASSWORD,DB_HOST,DB_PORT,DB_NAME: alternative toDATABASE_URLJWT_SECRETSTRIPE_KEYWEBHOOK_SECRETCHOCOLATE_SHOP_EMAILCHOCOLATE_SHOP_EMAIL_PASSWORDCORS_ORIGINS: comma-separated allowed origins (example:https://example.com,https://www.example.com)
VITE_API_URL: GraphQL endpoint URL (example:http://localhost:5000/graphqlorhttps://your-domain.com/graphql)
- The frontend is a static Vite build (
frontend/dist) that can be served by nginx, S3/CloudFront, etc. - If serving GraphQL on the same domain as the frontend, ensure your reverse proxy routes
/graphqlto the backend.