Backend for SmartLearn - A Learning Management System with TypeScript support and improved features.
SmartLearn-ts-backend is a backend service built with Node.js, TypeScript, and MongoDB. It provides RESTful APIs for managing learning resources.
- User authentication and authorization
- Course management
- Lesson management
- Assignment tracking
- Real-time notifications
-
Clone the repo:
git clone https://github.com/Elijah57/SmartLearn-ts-backend.git cd SmartLearn-ts-backend
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add the following:PORT=3000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
-
Start the server:
npm start
To start using the API, send requests to http://localhost:3000/api
.
POST /api/auth/register
- Register a new userPOST /api/auth/#
- Login a userGET /api/courses
- Get all coursesPOST /api/courses
- Create a new courseGET /api/lessons
- Get all lessonsPOST /api/lessons
- Create a new lessonGET /api/assignments
- Get all assignmentsPOST /api/assignments
- Create a new assignment
We welcome contributions! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License.