Skip to content

kuraykaraaslan/express-boilerplate

Repository files navigation

Express Boilerplate

express

This project is a boilerplate for building a web application using Express.js. It includes TypeScript for static typing, Prisma as an ORM, and various utilities to enhance the development process.

Features

  • Clean Architecture: A clean, scalable architecture for building web applications.
  • Api Versioning: Versioning the API endpoints for better control and maintenance.
  • Authentication: User authentication using JWT.
  • Error Handling: Centralized error handling.
  • Prisma ORM: Database access using Prisma.
  • TypeScript: Static typing for JavaScript.
  • Validation: Request validation using Validator.
  • Environment Variables: Environment variables using dotenv.

Screenshots

screenshot

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/kuraykaraaslan/express-boilerplate.git
    cd express-boilerplate
  2. Install dependencies:

    npm install
  3. Set up your environment variables: Create a .env file in the root directory and add your environment variables (e.g., database connection string).

Certification

To generate a self-signed SSL certificate for local development:

  1. Update the req.cnf file with your information.

  2. Run the following command:

    npm run cert
  3. The certificate and key files will be generated in the certs directory.

Usage

To start the application in development mode:

npm run dev # or `npm run start`

Services

The following services are available:

  • Authentication
  • Users
  • Tenants
  • Tenant Members

Roadmap

  • Add Prisma ORM
  • Add User authentication
  • Add Controllers
  • Add API versioning
  • Add unit tests
  • Add logging
  • Add error handling
  • Better documentation
  • Add Twillo Service
  • Add Mail Service
  • Add rate limiting

Development

To build the application:

npm run build

To run the application in production mode:

npm run start

Dependencies

Postman Collection

You can import the Postman collection from the following link:

Run in Postman

License

Diplomat is licensed under the MIT license. See LICENSE for more information.

Support

If you have any questions or need help with customizing the template, feel free to reach out to me on Twitter or GitHub.

Donate

If you like the template and want to support my work, you can buy me a coffee:

Buy Me A Coffee

Become a Patron!

Hire Me

If you need help with your next project, feel free to reach out to me. I'm available for freelance work.

About

ExpressJS based API boilerplate for my app development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published