EdTech SaaS is a cloud-based platform designed to facilitate communication between schools, teachers, and parents. The backend of this application provides API endpoints for user authentication, school management, student records, and assignments. This system ensures a seamless experience for schools by managing user roles and access levels using role-based authentication.
- Node.js - Backend runtime
- Express.js - Web framework
- Appwrite - Backend-as-a-Service (BaaS) for authentication and data storage
- Permit.io - Role-based access control (RBAC)
- Swagger - API documentation
Ensure you have the following installed:
- Node.js (v16+)
- NPM or Yarn
- Docker (if containerizing the backend)
- Clone the repository:
git clone https://github.com/VansRouges/Edtech-Saas-backend cd edtech-backend
- Install dependencies:
npm install
- Create a
.env
file and configure the required environment variables:APPWRITE_ENDPOINT=<Appwrite API Endpoint> APPWRITE_PROJECT_ID=<Your Appwrite Project ID> APPWRITE_API_KEY=<Your Appwrite API Key> JWT_SECRET=<Your JWT Secret> PERMIT_IO_API_KEY=<Your Permit.io API Key>
- Start the development server:
npm run dev
Below are the available API endpoints for the EdTech SaaS backend:
Method | Endpoint | Description |
---|---|---|
POST | /signup |
Registers a new user |
POST | /login |
Authenticates a user and returns a JWT |
Method | Endpoint | Description |
---|---|---|
GET | /getProfileByEmail?email={email} |
Retrieves user profile by email |
POST | /createProfile |
Creates a user profile after signup |
Method | Endpoint | Description |
---|---|---|
POST | /createSchool |
Creates a new school with admin privileges |
GET | /fetchSchoolsByUserId?userId={id} |
Fetches schools linked to a user |
GET | /getAllSchoolsAndSchoolCode |
Retrieves all schools and their unique codes |
PUT | /updateSchool/{schoolId} |
Updates school information |
Method | Endpoint | Description |
---|---|---|
POST | /createStudents |
Adds a new student to a school |
GET | /getAllStudents |
Retrieves all student records |
Method | Endpoint | Description |
---|---|---|
POST | /createAssignments |
Creates a new assignment for a class |
GET | /getAllAssignments |
Fetches all assignments |
We welcome contributions from the community! Follow these steps to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature-branch
) - Commit changes (
git commit -m 'Add new feature'
) - Push to your forked repository (
git push origin feature-branch
) - Open a Pull Request
This project is licensed under the MIT License. Feel free to use and modify it as needed.
For any questions or support, reach out to the maintainers at [[email protected]].