Skip to content

Repository files navigation

🚀 Backend & Database Integration System

A robust backend system built using Node.js, Express.js, and PostgreSQL to manage company data, IPO details, and related documents. This project demonstrates RESTful API development, database design, and proper relationship handling with Sequelize ORM.


📌 Overview

This project focuses on building a scalable backend architecture with:

  • Structured database schema
  • REST API development
  • Data relationships & integrity
  • Error handling and validation

🚀 Features

  • ➕ Add and manage company information
  • 📊 Manage IPO details linked to companies
  • 📄 Upload and store document links (RHP/DRHP)
  • 🔗 Proper relational mapping between entities
  • ❌ Cascade delete (removes related IPOs & documents when company is deleted)
  • ⚡ RESTful APIs with proper status codes
  • 🧪 API testing using Postman

🛠️ Tech Stack

  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • ORM: Sequelize
  • Testing Tool: Postman

📂 Project Structure

backend-project/ │ ├── models/ │ ├── Company.js │ ├── IPO.js │ └── Document.js

├── routes/ │ ├── companyRoutes.js │ ├── ipoRoutes.js │ └── documentRoutes.js

├── controllers/ │ ├── companyController.js │ ├── ipoController.js │ └── documentController.js

├── config/ │ └── db.js

├── app.js ├── server.js └── package.json


🧩 Database Design

Entities:

  • Company
  • IPO
  • Document

Relationships:

  • One Company → Many IPOs
  • One IPO → Many Documents
  • Cascade Delete Enabled

⚙️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/Sarthak23122003/backend-project.git cd backend-project

2️⃣ Install Dependencies

npm install

3️⃣ Setup PostgreSQL Database

Create a database (e.g., ipo_db)

Update credentials in .env or config file

4️⃣ Run Server

npm start

Server will run on:

http://localhost:5000


🔗 API Endpoints

🏢 Company APIs

POST /companies → Create company

GET /companies → Get all companies

DELETE /companies/:id → Delete company (cascade delete)

📊 IPO APIs

POST /ipos → Add IPO

GET /ipos → Get IPOs

📄 Document APIs

POST /documents → Upload document link

GET /documents → Get documents


🧪 Testing

Use Postman to test APIs:

Send JSON requests

Verify responses

Check status codes


⚠️ Error Handling

Proper HTTP status codes

Validation for inputs

Structured error responses


📚 References

ER Diagram (Project Documentation)

Sequelize Docs

PostgreSQL Docs

Postman API Testing


👨‍💻 Author

Sarthak Kaushal

Backend Developer |

Computer Science Student


About

Scalable backend system for IPO management built with Express.js and PostgreSQL using Sequelize ORM, supporting relational data modeling, document handling, and robust REST APIs with cascade deletion.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages