Skip to content

aishamerhebi/school-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Student Management System - Developer Skill Test

A comprehensive full-stack web application for managing school operations including students, staff, classes, notices, and leave management. This project serves as a skill assessment platform for Frontend, Backend, and Blockchain developers.

πŸ—οΈ Project Architecture

skill-test/
β”œβ”€β”€ frontend/           # React + TypeScript + Material-UI
β”œβ”€β”€ backend/            # Node.js + Express + PostgreSQL
β”œβ”€β”€ go-service/         # Golang microservice for PDF reports
β”œβ”€β”€ seed_db/           # Database schema and seed data
└── README.md          # This file

πŸš€ Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • PostgreSQL (v12 or higher)
  • npm or yarn

1. Backend Setup

cd backend
npm install
cp .env.example .env  # Configure your environment variables
npm start

2. Frontend Setup

cd frontend
npm install
npm run dev

3. Access the Application

** Database Setup **

# Create PostgreSQL database
createdb school_mgmt

# Run database migrations
psql -d school_mgmt -f seed_db/tables.sql
psql -d school_mgmt -f seed_db/seed-db.sql

🎯 Skill Test Problems

Frontend Developer Challenge

Fix "Add New Notice" Page

  • Location: /app/notices/add
  • Issue: When clicking the 'Save' button, the 'description' field doesn't get saved
  • Skills Tested: React, Form handling, State management, API integration
  • Expected Fix: Ensure description field is properly bound and submitted

Backend Developer Challenge

Complete CRUD Operations in Student Management

  • Location: /src/modules/students/students-controller.js
  • Issue: Implement missing CRUD operations for student management
  • Skills Tested: Node.js, Express, PostgreSQL, API design
  • Expected Implementation: Full Create, Read, Update, Delete operations

πŸ› οΈ Technology Stack

Frontend

  • Framework: React 18 + TypeScript
  • UI Library: Material-UI (MUI) v6
  • State Management: Redux Toolkit + RTK Query
  • Form Handling: React Hook Form + Zod validation
  • Build Tool: Vite
  • Code Quality: ESLint, Prettier, Husky

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: PostgreSQL
  • Authentication: JWT + CSRF protection
  • Password Hashing: Argon2
  • Email Service: Resend API
  • Validation: Zod

Database

  • Primary DB: PostgreSQL
  • Schema: Comprehensive school management schema
  • Features: Role-based access control, Leave management, Notice system

πŸ“‹ Features

Core Functionality

  • Dashboard: User statistics, notices, birthday celebrations, leave requests
  • User Management: Multi-role system (Admin, Student, Teacher, Custom roles)
  • Academic Management: Classes, sections, students, class teachers
  • Leave Management: Policy definition, request submission, approval workflow
  • Notice System: Create, approve, and distribute notices
  • Staff Management: Employee profiles, departments, role assignments
  • Access Control: Granular permissions system

Security Features

  • JWT-based authentication with refresh tokens
  • CSRF protection
  • Role-based access control (RBAC)
  • Password reset and email verification
  • Secure cookie handling

πŸ”§ Development Guidelines

Code Standards

  • File Naming: kebab-case for consistency across OS
  • Import Style: Absolute imports for cleaner code
  • Code Formatting: Prettier with consistent configuration
  • Git Hooks: Husky for pre-commit quality checks

Project Structure

frontend/src/
β”œβ”€β”€ api/           # API configuration and base setup
β”œβ”€β”€ assets/        # Static assets (images, styles)
β”œβ”€β”€ components/    # Shared/reusable components
β”œβ”€β”€ domains/       # Feature-based modules
β”‚   β”œβ”€β”€ auth/      # Authentication module
β”‚   β”œβ”€β”€ students/  # Student management
β”‚   β”œβ”€β”€ notices/   # Notice system
β”‚   └── ...
β”œβ”€β”€ hooks/         # Custom React hooks
β”œβ”€β”€ routes/        # Application routing
β”œβ”€β”€ store/         # Redux store configuration
β”œβ”€β”€ theme/         # MUI theme customization
└── utils/         # Utility functions
backend/src/
β”œβ”€β”€ config/        # Database and app configuration
β”œβ”€β”€ middlewares/   # Express middlewares
β”œβ”€β”€ modules/       # Feature-based API modules
β”‚   β”œβ”€β”€ auth/      # Authentication endpoints
β”‚   β”œβ”€β”€ students/  # Student CRUD operations
β”‚   β”œβ”€β”€ notices/   # Notice management
β”‚   └── ...
β”œβ”€β”€ routes/        # API route definitions
β”œβ”€β”€ shared/        # Shared utilities and repositories
β”œβ”€β”€ templates/     # Email templates
└── utils/         # Helper functions

πŸ§ͺ Testing Instructions

For Frontend Developers

  1. Navigate to the notices section
  2. Try to create a new notice with description
  3. Verify the description is saved correctly
  4. Test form validation and error handling

For Backend Developers

  1. Test all student CRUD endpoints using Postman/curl
  2. Verify proper error handling and validation
  3. Check database constraints and relationships
  4. Test authentication and authorization

πŸ“š API Documentation

Authentication Endpoints

  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/logout - User logout
  • GET /api/v1/auth/refresh - Refresh access token

Student Management

  • GET /api/v1/students - List all students
  • POST /api/v1/students - Create new student
  • PUT /api/v1/students/:id - Update student
  • DELETE /api/v1/students/:id - Delete student

Notice Management

  • GET /api/v1/notices - List notices
  • POST /api/v1/notices - Create notice
  • PUT /api/v1/notices/:id - Update notice
  • DELETE /api/v1/notices/:id - Delete notice

PDF Generation Service (Go)

  • GET /api/v1/students/:id/report - Generate and download a PDF report for a specific student.

🀝 Contributing / Submission Instructions

  1. Complete the assigned task
  2. Push your results to a public repository
  3. Share the repository link along with a short Loom video demonstrating your results.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For questions and support:

  • Create an issue in the repository
  • Check existing documentation in /frontend/README.md and /backend/README.md
  • Review the database schema in /seed_db/tables.sql

Happy Coding! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published