- Node.js 18+ installed
- Backend API running on
http://localhost:9080
# Install dependencies
npm install# Start dev server (runs on http://localhost:3000)
npm run dev
# Type check
npm run type-check
# Build for production
npm run build
# Preview production build
npm run previewThis frontend follows a domain-first hexagonal architecture:
UI Layer (React) → Domain Layer (Pure TS) → Infrastructure (Adapters)
✅ DO:
- Keep domain logic in pure TypeScript functions
- Use value objects for data validation
- Create thin React components (presentation only)
- Wire UI to domain via hooks
❌ DON'T:
- Put business logic in components
- Call APIs directly from components
- Use useState for domain state
- Import UI libraries in domain layer
src/
├── domain/ # Business logic (pure TypeScript)
│ ├── models/ # Domain models & value objects
│ ├── ports/ # Interface definitions
│ ├── use-cases/ # Application logic
│ └── errors/ # Domain errors
├── infrastructure/ # External integrations
│ ├── adapters/ # API clients
│ └── dto/ # Data transfer objects
└── ui/ # React application
├── components/ # UI components
├── pages/ # Page components
├── hooks/ # Custom hooks
└── providers/ # Context providers
- ✅ Login with email/password
- ✅ Password reset request/confirmation
- ✅ Role-based dashboards (Admin/Teacher/Parent)
- ✅ Session management with JWT
- ✅ Protected routes
- ✅ Domain-first architecture
Backend: http://localhost:9080
/api/auth/login- User authentication/api/auth/password-reset/*- Password reset/api/users/*- User management (admin)/api/students/*- Student management/api/classes/*- Class management
Build fails?
rm -rf node_modules package-lock.json
npm installType errors?
npm run type-checkAPI connection issues?
- Ensure backend is running on port 9080
- Check browser console for CORS errors
Proprietary - All rights reserved