Mayank2808sharma / IRCTC-backend

26 stars 29 forks source link
# IRCTC Backend
🌟 Stars 🍴 Forks 🐛 Issues 🔔 Open PRs 🔕 Close PRs
Stars Forks Issues Open Pull Requests Close Pull Requests

Project Overview

Built using Node.js, Express, and Sequelize, this system supports functionalities for both regular users and administrators, ensuring efficient handling of train schedules, seat availability, and user bookings.

Youtube video : ↗️

## 💻 Tech Stacks ![Node.js](https://img.shields.io/badge/Node.js-%23339933.svg?style=for-the-badge&logo=node.js&logoColor=white) ![Express.js](https://img.shields.io/badge/Express.js-%23000000.svg?style=for-the-badge&logo=express&logoColor=white) ![Sequelize](https://img.shields.io/badge/Sequelize-%23474A8A.svg?style=for-the-badge&logo=sequelize&logoColor=white) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-%23336791.svg?style=for-the-badge&logo=postgresql&logoColor=white)
## -> Key Features <-

Getting Started

Prerequisites

To run this project locally, you will need Node.js and PostgreSQL installed on your machine. Optionally, you can use Docker for running PostgreSQL.

Installation

1. Clone the repository

git clone https://github.com/mayank2808sharma/IRCTC-backend
cd IRCTC-backend

2. Install Dependencies

npm i

3. Set Up Environment Variables

Create a .envfile in the root directory and update it with your database and authentication configurations as follows:

PORT= 3000
DB_HOST = hostname 
DB_USER = username for the database
DB_PASSWORD = password for the database
DB_NAME = name of the database
JWT_SECRET = secret key used to sign and verify JSON Web Tokens

4. Database Setup

Make sure your PostgreSQL database is running and the credentials in .env match your database info. Run the following command to set up your database tables:

npm run setdb

5. Start the Server

npm start

This will start the server on http://localhost:3000.

API Endpoints

Public Endpoints

User Endpoints

Admin Endpoints

🤝 Our Contributors

![Contributors](https://contrib.rocks/image?repo=Mayank2808sharma/IRCTC-backend)

Thank you for contributing to our repository

Don't forget to give us a ⭐