Skip to content

Minibank API is a compact TypeScript-backed server with Express, TypeORM, and PostgreSQL, featuring minimalistic endpoints. Utilizing Swagger, it offers a streamlined development experience and welcomes contributions for optimization and expansion.

Notifications You must be signed in to change notification settings

IkboljonMe/minibank-api

Repository files navigation

Minibalog API

Minibalog API is a small TypeScript-backed server API built with Node.js, TypeScript, Express, TypeORM, and Swagger. This API is designed to be minimalistic, featuring only 4-5 endpoints that you can explore and test using the Swagger documentation provided.

Packages Used

The Minibalog API project utilizes the following packages:

  • Node.js: JavaScript runtime for server-side development.
  • TypeScript: Provides strong typing for enhanced developer experience.
  • Express: Web framework for Node.js, used for building the server.
  • TypeORM: Object-Relational Mapper (ORM) for TypeScript and JavaScript.
  • PostgreSQL: Open-source relational database system.
  • Swagger: Generates interactive API documentation.

Installation

  1. Clone the repository:

    git clone [email protected]:IkboljonMe/minibank-api.git
    cd minibalog-api
  2. Create a .env file based on .env.example:

    cp .env.example .env

    Edit the .env file and provide the necessary configuration values. For PostgreSQL, add your local database credentials:

    PG_HOST=localhost
    PG_PORT=5432
    PG_USERNAME=your_username
    PG_PASSWORD=your_password
    PG_DATABASE=your_database
  3. Install dependencies and run the server:

    npm install
    npm start

    This will start the server. Open http://localhost:1337/docs to access Swagger documentation and explore the available endpoints.

TypeORM and PostgreSQL

TypeORM is used for efficient database connectivity and management. It is an Object-Relational Mapper (ORM) that enables seamless interaction with databases using TypeScript. In the context of Minibalog API, PostgreSQL is utilized as the database. Ensure that you have a local PostgreSQL database set up and the credentials added to the .env file.

Swagger Documentation

Explore and interact with the API using Swagger documentation. Visit http://localhost:1337/docs to view detailed information about available routes, request payloads, and responses. Swagger provides a user-friendly interface for testing and understanding the functionality of each endpoint.

Project Structure

The project is kept minimal with 4-5 endpoints, demonstrating the use of one-to-many and many-to-many relations with TypeORM.

Contribution

Contributions to the project are welcome! Feel free to optimize the code, add more endpoints, and introduce validation for enhanced functionality and security.

TODO

  • Optimize code
  • Add more endpoints
  • Implement input validation

Feel free to contribute and make Minibalog API even better!

About

Minibank API is a compact TypeScript-backed server with Express, TypeORM, and PostgreSQL, featuring minimalistic endpoints. Utilizing Swagger, it offers a streamlined development experience and welcomes contributions for optimization and expansion.

Resources

Stars

Watchers

Forks