This repository contains the source code for the backend of the Link & Learn application. The backend is built using Node.js and Express, with PostgreSQL as the database. It handles user authentication, class scheduling, reservation management, and email notifications.
- User Authentication: Provides secure login and registration for students and teachers.
- Class Scheduling: Manages teacher availability and student bookings.
- Reservation Management: Handles the creation, updating, and cancellation of reservations.
- Testing: Comprehensive unit and integration tests to ensure the reliability and correctness of the backend.
- Email Notifications: Sends email notifications for actions such as password resets and booking confirmations.
- API Endpoints: Provides RESTful APIs for frontend communication.
- Error Handling: Includes comprehensive error handling to ensure robustness.
- Node.js: JavaScript runtime for building server-side applications.
- Express: Web framework for Node.js to handle HTTP requests and middleware.
- PostgreSQL: Relational database for storing user and reservation data.
- Sequelize: ORM for interacting with the PostgreSQL database.
- Bcrypt: Library for hashing passwords.
- JWT: JSON Web Tokens for user authentication.
- Nodemailer: For sending emails.
- Jest: Testing framework for unit and integration tests.
- Supertest: For HTTP assertions in tests.
- Clone this repository:
git clone https://github.com/yourusername/link-and-learn-backend.git
- Navigate to the project directory:
cd link-and-learn-backend
- Install dependencies:
npm install
- Set up your environment variables by creating a .env file in the root directory. Example:
DATABASE_URL=your-database-url JWT_SECRET=your-jwt-secret EMAIL_HOST=your-email-host EMAIL_PORT=your-email-port EMAIL_USER=your-email-user EMAIL_PASS=your-email-password
- Clone this repository:
npx sequelize-cli db:migrate
- Start the server:
npm start