A comprehensive web application for teachers to manage classrooms, students, and finances with an intuitive dashboard.
Teacher Hub helps teachers efficiently manage their educational and financial responsibilities. Track classrooms, students, expenses, and income all in one unified platform.
- π₯ Classroom Management: Create and organize classrooms
- π Student Management: Assign and track students across classes
- π° Financial Tracking: Monitor expenses and income
- π Dashboard: Visual analytics and insights
- π Authentication: JWT and Google OAuth integration
Teacher Hub
βββ π§ teacher-hub-server # Backend API (Node.js + Express)
βββ βοΈ teacher-hub-client # Frontend App (React + Next.js)
βββ ποΈ PostgreSQL # Primary database
βββ π¦ Redis # Caching & job queues
βββ π Nginx # Reverse proxy
- Runtime: Node.js + Express + TypeScript
- Database: PostgreSQL + Neon + Drizzle ORM
- Cache/Queue: Redis + BullMQ
- Authentication: Passport (JWT + Google OAuth)
- Security: Helmet, CORS, Rate Limiting
- Logging: Pino
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build TypeScript to JavaScript |
npm run start |
Start production server |
npm run db:generate |
Generate new database migration |
npm run db:migrate |
Run pending migrations |
npm run db:push |
Push schema changes to database |
npm run db:studio |
Open Drizzle Studio |
npm run lint |
Run ESLint |
npm run lint:fix |
Fix ESLint issues |
- Framework: React + Next.js + TypeScript
- Styling: TailwindCSS + shadcn/ui
- State Management: TanStack Query
- Authentication: JWT integration
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
- Node.js 18+
- Docker & Docker Compose
-
Clone both repositories in the same folder
# Create a parent directory mkdir teacher-hub-project cd teacher-hub-project # Clone both repositories git clone https://github.com/Akib-Raihan-4/Teacher-hub-server git clone https://github.com/Akib-Raihan-4/Teacher-hub-client
-
Set up environment files
# Backend environment cd teacher-hub-server cp .env.example .env.development # Frontend environment cd ../teacher-hub-client cp .env.example .env
-
Configure your environment variables
Backend (
.env.development):DATABASE_URL=your_postgresql_connection_string REDIS_URL=redis://localhost:6379 REDIS_PASSWORD=your_redis_password JWT_SECRET=your_jwt_secret GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret ...
Frontend (
.env.local):NEXT_PUBLIC_API_URL=http://localhost:5000 NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
-
Start the application with Docker
# Navigate to server folder and run compose cd teacher-hub-server docker compose -f docker-compose.dev.yml up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Application: http://localhost (via Nginx)
# Start all services
docker compose -f docker-compose.dev.yml up --build
# Run in background
docker compose -f docker-compose.dev.yml up -d --build
# Stop services
docker compose -f docker-compose.dev.yml down
# View logs
docker compose -f docker-compose.dev.yml logs -f| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | React application |
| Backend | http://localhost:5000 | API server |
| Nginx | http://localhost | Reverse proxy |
| Redis | localhost:6379 | Cache & job queue |
teacher-hub-project/
β
βββ teacher-hub-server/ # Backend API
β βββ src/
β βββ Dockerfile
β βββ docker-compose.dev.yml # β οΈ Run this file
β βββ .env.example
β βββ package.json
β
βββ teacher-hub-client/ # Frontend App
βββ app/
βββ Dockerfile
βββ .env.example
βββ package.json
- Create and organize multiple classrooms
- Set classroom schedules and capacity
- Track classroom utilization
- Add students with detailed profiles
- Assign students to classrooms
- Track fees for each students
- Track and record unpaid fees
- Income Tracking: Record tuition fees and payments
- Expense Tracking: Monitor supplies and materials
- Analytics: Visual charts and reports
- Categories: Organize transactions by type
- Financial overview with charts
- Student enrollment statistics
- Monthly and yearly reports
cd teacher-hub-server
# Generate migration
npm run db:generate
# Apply migrations
npm run db:migrate
# Open database GUI
npm run db:studioIf you prefer running without Docker:
# Start backend
cd teacher-hub-server
npm install
npm run dev
# Start frontend (new terminal)
cd teacher-hub-client
npm install
npm run devBuilt for educators who need better tools to manage their teaching business.