Shello Demo is a full-stack e-commerce app for phone cases. It includes an Express + TypeScript API with MongoDB and an Angular SSR frontend. Features include authentication (JWT + refresh cookies), Google OAuth popup sign-in, product and order management, and an admin dashboard for content and catalog updates.
- Backend: Node.js, Express, TypeScript, Mongoose, JWT, bcrypt
- Frontend: Angular (SSR), RxJS, SCSS
- Database: MongoDB
- Backend/server/ API server (Express + TypeScript)
- frontend/ Angular SSR app
- *.MD Architecture and security docs
- Node.js 20+ (recommended)
- npm 10+
- MongoDB running locally (or a remote MongoDB URI)
Run the full stack with Docker Compose and a reverse proxy:
bash scripts/bootstrap.sh shellotech.eu.org
docker compose up -d --buildThis starts MongoDB, the API, the Angular SSR frontend, and Nginx on port 80. Update FRONTEND_URL and optional admin credentials in .env as needed.
cd Backend/server
npm installCreate a .env file (see example below), then run:
npm run devThe API will run on http://localhost:4000 by default.
cd frontend
npm install
ng sThe frontend will run on http://localhost:4200 and proxies /api and /uploads to the backend.
Create Backend/server/.env using the example below and adjust values as needed.
NODE_ENV=development
PORT=4000
MONGO_URI=mongodb://localhost:27017/shello_db
JWT_SECRET=replace-with-strong-secret
REFRESH_SECRET=replace-with-strong-secret
REFRESH_TOKEN_HMAC_KEY=replace-with-strong-secret
TWO_FACTOR_ENCRYPTION_KEY=replace-with-strong-random-secret
FRONTEND_URL=http://localhost:4200
BCRYPT_ROUNDS=12
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=100
TRUST_PROXY=0
SUPER_ADMIN_EMAIL=
SUPER_ADMIN_PASSWORD=
SUPER_ADMIN_PIN_CODE=
SUPER_ADMIN_NAME=Shello
SUPER_ADMIN_LAST_NAME=Admin
ADMIN_RESET_PASSWORD=
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:4200/api/v1/auth/google/callback
GOOGLE_ALLOWED_ORIGIN=http://localhost:4200WARNING: Do not commit real secret values into the repository. Keep
.envlocal and listed in.gitignore.Use
.env.examplefor placeholders only.
For 2FA, generate a strong random secret for TWO_FACTOR_ENCRYPTION_KEY (see authentificator.md).
- Create OAuth credentials in Google Cloud Console.
- Add the redirect URI:
- Add the frontend origin:
- Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in Backend/server/.env.
Backend (Backend/server):
- npm run dev
Frontend (frontend):
- ng s
- ng build
See the architecture and security docs in the repository root:
- Overall-Architecture.MD
- Backend-Architecture.MD
- Frontend-Architecture.MD
- SECURITY_STANDARDS.MD
- JWT_STRATEGY.md
- Refresh tokens are stored in httpOnly cookies.
- Google sign-in uses a popup flow with a localStorage fallback to handle COOP restrictions.