Skip to content

zaid4kspr/Backend-starter

Repository files navigation

Express.js server with TypeORM, PostgreSQL integration via Docker, and TypeScript configuration

image

Apis: Login, register and me

💎 The Package Features

        

           

  

🐳 Docker :: Container Platform

  • starts the containers in the background and leaves them running : docker-compose up -d
  • Stops containers and removes containers, networks, volumes, and images : docker-compose down

✨ ESLint, Prettier :: Code Formatter

It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

  1. Install VSCode Extension Prettier, ESLint

📗 Swagger :: API Document

Swagger is Simplify API development for users, teams, and enterprises with the Swagger open source and professional toolset.

Easily used by Swagger to design and document APIs at scale.

Start your app in development mode at http://localhost:3000/api-docs

🏎 SWC :: a super-fast JavaScript / TypeScript compiler

SWC is an extensible Rust-based platform for the next generation of fast developer tools.

SWC is 20x faster than Babel on a single thread and 70x faster on four cores.

  • tsc build :: npm run build
  • swc build :: npm run build:swc

🗂 Code Structure

│
├──📂 .vscode
│  ├── launch.json
│  └── settings.json
│
├──📂 src
│  ├──📂 config
│  │  └── index.ts
│  │
│  ├──📂 controllers
│  │  ├── auth.controller.ts
│  │  └── users.controller.ts
│  │
│  ├──📂 dtos
│  │  └── users.dto.ts
│  │  └── photos.dto.ts
│  │
│  ├──📂 exceptions
│  │  └── httpException.ts
│  │
│  │
│  ├──📂 interfaces
│  │  ├── auth.interface.ts
│  │  ├── clients.interface.ts
│  │  ├── photos.interface.ts
│  │  ├── routes.interface.ts
│  │  └── users.interface.ts
│  │
│  ├──📂 middlewares
│  │  ├── auth.middleware.ts
│  │  ├── error.middleware.ts
│  │  ├── photoUpload.middleware.ts
│  │  └── validation.middleware.ts
│  │
│  ├──📂 entities
│  │  └── users.entity.ts
│  │  ├── clients.entity.ts
│  │  └── photos.entity.ts
│  │
│  ├──📂 routes
│  │  ├── auth.route.ts
│  │  └── users.route.ts
│  │
│  ├──📂 services
│  │  ├── auth.service.ts
│  │  ├── photos.service.ts
│  │  └── users.service.ts
│  │
│  ├──📂 utils
│  │  ├── logger.ts
│  │  └── vaildateEnv.ts
│  │
│  ├── app.ts
│  └── server.ts
│
├── .dockerignore
├── .editorconfig
├── .env.development.local
├── .env.production.local
├── .env.test.local
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .huskyrc
├── .lintstagedrc.json
├── .prettierrc
├── .swcrc
├── docker-compose.yml
├── Dockerfile.dev
├── Dockerfile.prod
├── ecosystem.config.js
├── jest.config.js
├── Makefile
├── package-lock.json
├── package.json
├── swagger.yaml
└── tsconfig.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published