4.0 KiB
4.0 KiB
Technology Stack
Analysis Date: 2026-02-15
Languages
Primary:
- JavaScript (ES6+) - Both frontend and backend
- SQL - PostgreSQL database queries in backend
Secondary:
- HTML/CSS - Frontend UI styling
Runtime
Environment:
- Node.js 20 (LTS) - Specified in Dockerfiles (
node:20-alpine)
Package Manager:
- npm (Node Package Manager)
- Lockfile:
package-lock.jsonpresent in bothfrontend/andbackend/
Frameworks
Core:
- React 18.2.0 - Frontend UI library (
frontend/package.json) - Express.js 4.18.2 - Backend REST API framework (
backend/package.json)
Frontend:
- Vite 5.0.8 - Frontend build tool and dev server
- Config:
frontend/vite.config.js - React plugin:
@vitejs/plugin-react4.2.1
- Config:
Routing:
- React Router DOM 6.21.0 - Frontend client-side routing
- Configured in
frontend/src/main.jsxwith BrowserRouter and Routes
- Configured in
Web Server:
- Nginx (Alpine) - Production frontend server
- Config:
frontend/nginx.conf - Serves static assets, proxies
/apito backend - Gzip compression enabled
- Config:
Key Dependencies
Frontend Critical:
react18.2.0 - UI frameworkreact-dom18.2.0 - DOM renderingreact-router-dom6.21.0 - Client-side routing
Frontend Dev:
vite5.0.8 - Build tooling@vitejs/plugin-react4.2.1 - React JSX support@types/react18.2.43 - TypeScript types@types/react-dom18.2.17 - TypeScript types
Backend Critical:
express4.18.2 - HTTP server frameworkpg8.11.3 - PostgreSQL client libraryjsonwebtoken9.0.2 - JWT authentication token generation/verificationbcryptjs2.4.3 - Password hashing and verificationcors2.8.5 - Cross-origin resource sharing middleware
Backend Dev:
nodemon3.0.2 - Auto-restart on file changes
Configuration
Environment:
- Database connection via environment variables:
DB_HOST- PostgreSQL hostname (default:postgres)DB_PORT- PostgreSQL port (default:5432)DB_USER- Database user (default:postgres)DB_PASSWORD- Database passwordDB_NAME- Database name (default:gravl)JWT_SECRET- JWT signing key (default:gravl-secret-key-change-in-production)PORT- Backend API port (default:3001)
Build:
- Frontend:
vite.config.js- Vite configuration with React plugin- Dev server:
0.0.0.0:5173 - API proxy:
/apiroutes tohttp://localhost:3001
- Dev server:
- Backend: Simple Node.js entry point at
backend/src/index.js
Database
Primary:
- PostgreSQL - Relational database
- Initialized via
db/init.sql - Accessed via
pgNode.js client library - Tables:
users,programs,program_days,exercises,program_exercises,workout_logs,user_measurements,user_strength
- Initialized via
Platform Requirements
Development:
- Node.js 20+
- npm 9+
- PostgreSQL 12+
- Docker and Docker Compose (for containerized development)
Production:
- Deployment target: Docker containers via Docker Compose
- Frontend container:
node:20-alpine(build) →nginx:alpine(production) - Backend container:
node:20-alpine - Reverse proxy: Traefik (configured in
docker-compose.yml) - Network: Homelab environment with internal proxy and homelab networks
Build Process
Frontend:
npm install- Install dependenciesnpm run build- Vite builds todist/directory- Dockerfile multi-stage build:
- Stage 1: Node 20 Alpine - npm install and build
- Stage 2: Nginx Alpine - Serve built assets from
/usr/share/nginx/html
Backend:
npm install --production- Install dependencies (production only)- Dockerfile: Node 20 Alpine - Copy src and run
npm start
Development Commands
Frontend:
npm run dev- Start Vite dev server on0.0.0.0:5173with hot reloadnpm run build- Production build todist/npm run preview- Preview production build
Backend:
npm run start- Runnode src/index.js(production)npm run dev- Run withnodemonfor auto-restart on file changes
Stack analysis: 2026-02-15