https://github.com/frckbrice/secondary-school-web-app
a school app that display school activities to all the world and that helps the school manage some internal tasks.
https://github.com/frckbrice/secondary-school-web-app
docker-file docker-image drizzle-orm gitflow github-actions mtn-momo-node-sdk next15 orange-money playright postgresql react-dom19v react19 shadcn stripe-payments typescript vitest xlsx
Last synced: 2 months ago
JSON representation
a school app that display school activities to all the world and that helps the school manage some internal tasks.
- Host: GitHub
- URL: https://github.com/frckbrice/secondary-school-web-app
- Owner: frckbrice
- Created: 2025-07-18T21:56:59.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-19T00:52:29.000Z (11 months ago)
- Last Synced: 2025-07-19T03:58:57.379Z (11 months ago)
- Topics: docker-file, docker-image, drizzle-orm, gitflow, github-actions, mtn-momo-node-sdk, next15, orange-money, playright, postgresql, react-dom19v, react19, shadcn, stripe-payments, typescript, vitest, xlsx
- Language: TypeScript
- Homepage: https://gbhs-bafia-web-site.vercel.app
- Size: 7.24 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# - Next.js Fullstack School Management System
> **Note:** All project documentation files (API routes, testing guides, etc.) are now located in the `/docs/` directory. The main `README.md` remains at the root for quick reference.
A modern, fullstack school management platform built with Next.js 15, TypeScript, PostgreSQL, Drizzle ORM, and Radix UI. Features robust authentication, real-time updates, admin/teacher/student dashboards, and a fully responsive, accessible UI.
## ๐ Features
- **Authentication**: NextAuth.js with role-based access control (Super Admin, Admin, Teacher, Student, User)
- **Database**: PostgreSQL with Drizzle ORM
- **UI**: Radix UI, Tailwind CSS, modern responsive design
- **API**: RESTful Next.js API routes for all backend logic
- **File Uploads**: Multer, Cloudinary integration
- **Real-time**: WebSocket support, React Query for live data
- **Admin Dashboard**: 8+ management sections (users, students, teachers, news, events, gallery, applications, contacts)
- **Student Portal**: Results, petitions, anonymous reports, status tracking
- **Teacher Portal**: Grade reports, student management, import/export
- **SEO & PWA**: SEO-optimized, installable, offline support
- **Accessibility**: WCAG AA, keyboard navigation, ARIA labels
- **Testing**: Vitest, React Testing Library, Playwright (E2E)
- **Dev Experience**: TypeScript, ESLint, Prettier, hot reload
## ๐๏ธ Project Structure
```
โโโ public/ # Static assets
โ โโโ images/ # Static images (school photos, logos, etc.)
โ โโโ grading-templates/ # Excel templates for grade reports
โ โโโ sample-documents/ # Sample PDFs and documents
โ โโโ favicon.png # Site favicon
โโโ src/
โ โโโ app/ # Next.js App Router
โ โ โโโ admin/ # Admin dashboard routes
โ โ โโโ api/ # API routes
โ โ โโโ ... # Other pages/routes
โ โโโ components/ # React components (UI, admin, pages, providers)
โ โโโ hooks/ # Custom React hooks
โ โโโ lib/ # Utilities, db, services
โ โโโ types/ # TypeScript types
โ โโโ utils/ # Test/data utilities
โโโ migrations/ # Database migrations
โโโ docs/ # Documentation
```
## ๐ Static Assets
- **Images**: Place all static images in `/public/images/*`
- School photos, logos, and static content images
- Accessible via `/images/filename.ext` in the app
- **Documents**: Sample documents in `/public/sample-documents/*`
- **Templates**: Grading templates in `/public/grading-templates/*`
## ๐ ๏ธ Setup
1. **Clone & Install**
```bash
git clone git@github.com:frckbrice/secondary-school-web-app.git
cd secondary-school-web-app
yarn install
```
2. **Configure Environment**
- Copy `.env.example` to `.env.local` and fill in DB, NextAuth, etc.
3. **Database**
- Start PostgreSQL (see Docker example below)
- Run migrations:
```bash
yarn run db:generate
yarn run db:push
# (Optional) Seed sample data
yarn run db:setup
```
4. **Run Dev Server**
```bash
yarn run dev
# App at http://localhost:3000
```
### Docker (for PostgreSQL)
```bash
docker run --name gbhs-postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=gbhs_db \
-e POSTGRES_USER=gbhs_user \
-p 5432:5432 \
-v gbhs_pgdata:/var/lib/postgresql/data \
-d postgres:15
```
## ๐งช Testing
- **Unit/Integration**: `yarn test` (Vitest, React Testing Library)
- **E2E**: `yarn run test:e2e` (Playwright)
- **Custom scripts**: See `src/utils/test-crud.ts`, `src/utils/test-user-forms.ts`
## ๐๏ธ Build & Deploy
- **Build**: `yarn run build`
- **Start**: `yarn run start`
- **Lint**: `yarn run lint`
- **Format**: `yarn run format`
## ๐ Default Logins (after seeding)
- Super Admin: `super_admin` / `admin123`
- Admin: `admin` / `admin123`
- Teacher: `teacher1` / `teacher123`
- Student: `GBHS2024001` / `student123`
## ๐ฆ Dockerfile Example
```Dockerfile
# Dockerfile for "" Next.js App
FROM node:20-alpine
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
EXPOSE 3000
CMD ["yarn", "start"]
```
## โ๏ธ CI/CD (GitHub Actions Example)
Create `.github/workflows/ci-cd.yml`:
```yaml
name: CI/CD
on:
push:
branches: [main]
jobs:
build-test-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build
- run: yarn test
- run: yarn test:e2e
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
```
## ๐ License
Copyright (c) 2025 X School. All rights reserved.