Repository files navigation
RESTful API for a School Management System
Features:
Schedules (for teachers & students)
Uplodad/Download subject materials
Fees inequiry
Grades inequiry
Code-wise
API Pagination #37
API Versioning #37
To OOP? (Maybe) #47
Better Error handling
Validations related #34
Trying to make sure that different entities are always in a valid state
Docs - SwaggerHub Link
Better & more detailed Readme #46
API Docs #40
Backend Stack (Modules) so far:
Nodejs & Express - JS Runtime & HTTP Server
PassportJS - Authentication
Express-Session - Session Manager
Amazon SDK - DBs & Emails Not used yet
Morgan - Logger
Jest - API Testing
Prettier & Eslint - Linting & Formatting
AWS - IaaS
Docker - Development Environment
Starting up the development environment
Docker
This is strictly required for the Database to work, any local/cloud PostgreSQL database would do the job.
NodeJS
After cloning the repo, open a terminal in your favourite IDE:
Start the DBs
In a terminal docker compose -f postgres-compose.yml up
Install dependencies
Change .sample.env to .env
Run the tests & make sure all of them pass:
Run the app
API Docs can be visited at http://localhost:8080/api-docs/
Docker:
docker compose -f postgres-compose.yml up for running PostgreSQL.
docker exec -it postgres-db psql for getting into psql terminal.
Run specific test
npm run test -- -t '<name>'
Resetting DB:
Through psql:
DROP TABLE <all table names>
DELETE FROM pg_type WHERE typnamespace=2200;
Trivial SELECT typname, typnamespace FROM pg_type WHERE typnamespace=2200;
Through sequelize using umzug:
npm run migration:downAll
Access EC2 instance:
Make sure that the Security Group allows SSH from your IP.
ssh -i "C:\Users\Lenovo\.ssh\<.pem file>" <rest of aws ip>
Access RDS instance:
Use of AWS's Infrastructure as opposed to VPS or a group of containers generally.
Using Angular for Frontend.
Not using a proper framework for Backend. (or both FE & BE)
Use of PassportJS for authentication as opposed to 3rd party auth services (e.g. AWS Cognito) & open source ones (e.g. Ory Hydra).
How to store files?
Server storage ✅ (for now), AWS S3, MinIO, OpenStack Swift
Validating input (and possibily sanitizing?)
express-validator (very JS), runtypes, zod ✅ (puerly based on it being most used), others...
Starting with sequelize, then ?eventually? switching to sequelize-typescript.
About
Cloud School Management System, with Expressjs, TypeScript & PostgreSQL.
Topics
Resources
License
Stars
Watchers
Forks
You can’t perform that action at this time.