A simple educational application for managing employees.
The repository is split into two deployable parts:
- hrApp-frontend/ — React (Vite) frontend
- hrApp-backend/ — Express API powered by PostgreSQL and Sequelize
Runtime architecture:
- Frontend — deployed to Render as a static site
- Backend — deployed to Render as a separate web service
- Database — hosted on Supabase PostgreSQL
Static site on Render: https://hrappsite.onrender.com/
API on Render: https://hrapp-ovc7.onrender.com/employees
PostgreSQL on Supabase:
- backend connects to Supabase through
DATABASE_URL - frontend never talks to Supabase directly
- React
- Vite
- React Router
- Axios
- Material UI
- ESLint
- Express
- Sequelize
- PostgreSQL
- Supabase (managed PostgreSQL)
- Node.js
- Prettier for consistent formatting
- EditorConfig for shared editor defaults
- ESLint for frontend code quality
- GitHub Actions CI with
concurrencyand explicittimeout-minutes
- View employee list
- Add new employees
- Edit employee details
- Probation and anniversary reminders
hrApp/
├── .github/workflows/ci.yml
├── package.json
├── hrApp-frontend/
│ ├── src/
│ └── README.md
├── hrApp-backend/
│ ├── src/
│ ├── scripts/
│ ├── db.json
│ └── .env.example
└── README.md
GET /employeesPOST /employeesPATCH /employees/:idGET /health
Install dependencies once per package:
npm ci
npm --prefix hrApp-frontend ci
npm --prefix hrApp-backend ciCreate backend env from the example:
cp hrApp-backend/.env.example hrApp-backend/.envUpdate DATABASE_URL in hrApp-backend/.env to your PostgreSQL instance.
Seed PostgreSQL from the current sample dataset when needed:
npm --prefix hrApp-backend run db:migrate
npm --prefix hrApp-backend run db:seedStart the backend:
cd hrApp-backend
npm startStart the frontend:
cd hrApp-frontend
npm run devOptional frontend environment override:
VITE_API_URL=http://localhost:3001Recommended backend environment variables:
CORS_ORIGIN=http://localhost:5173,https://your-frontend.onrender.com
DB_SSL=trueRecommended deployment split:
- frontend: Render Static Site
- backend: Render Web Service
- database: Supabase PostgreSQL
Run repository-wide checks from the project root:
npm run format
npm run format:check
npm run lint
npm run build
npm run check:backend
npm run check- The frontend uses
VITE_API_URLwhen it is set. - Without
VITE_API_URL, development useshttp://localhost:3001and production uses the Render backend. hrApp-backend/db.jsonis now seed data for PostgreSQL, not the runtime database.- The backend schema is managed through explicit migrations instead of
sequelize.sync. - The backend CORS policy is configurable through
CORS_ORIGIN. - The production database is intended to live on Supabase, while frontend and backend are deployed separately on Render.
- CI runs formatting, frontend lint/build and backend seed-data validation on pull
requests and pushes to
main.