Skip to content
/ ExpressBase Public template

A base for making express js + react applications using typescript

Notifications You must be signed in to change notification settings

Xeretis/ExpressBase

Repository files navigation

ExpressBase

An opinionated express.js setup using typescript for creating APIs paired with a React frontend also using typescript.

I primarily made this for my own use in an other project but I will be updating it once I add more features to that project.

Features

Backend

  • MVC architecture (well, no views since it's for APIs only)
  • Secure authentication and authorization using tokens
  • Prisma ORM
  • Redis based message queue (BullMQ)
  • Email sending (Nodemailer)
  • Easy request validation using zod
  • Typed requests
  • Exception handling
  • Rate limiting middleware using redis
  • Support for multiple routes files
  • Logging using winston and morgan
  • Shared libraries between frontend and backend (validation, respose types, etc)
  • User management
  • Utils for working with file uploads and downloads
  • Permissions system for more complex authorization
  • Better configurability for integrating with the frontend
  • Websockets using socket.io

Frontend

  • Vite for asset bundling
  • Basic configuration of vite for working with the backend conveniently
  • Mantine beacuse it's awesome
  • Frontend for the default features of the backend (currently only auth)
  • Redux for state management and RTK Query for working with the backend api
  • React Router for routing

Other

  • A simple cli for generating controllers, jobs, react components, etc

Usage

  1. Clone the repository and run pnpm install
  2. Copy .env.example to .env and fill in the values in both apps/backend and apps/frontend
  3. Apply prisma migrations and generate the prisma client in apps/backend
  4. Run both the backend and frontend with pnpm dev in their corresponding directories

About

A base for making express js + react applications using typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages