Skip to content

karademada/simple-typescript-starter

 
 

Repository files navigation

Madaloc360 Backend

The backend service for Madaloc360 platform, handling reservations and messaging via WebSockets.

Features

  • Domain-Driven Design architecture
  • TypeScript with strict type checking
  • WebSocket messaging system
  • Reservation management
  • Docker containerization
  • Jest testing
  • ESLint + Prettier code formatting

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm
  • Docker (optional)

Installation

  1. Clone the repository
  2. Install dependencies:
pnpm install

Development

Start the development server:

pnpm run dev

This will:

  • Start the server with hot reload
  • Watch for file changes
  • Run tests on changes

Production

Build the production bundle:

pnpm run build

Start the production server:

pnpm start

Testing

Run tests once:

pnpm test

Run tests in watch mode:

pnpm test:dev

Docker

Build the Docker image:

docker-compose build

Start the services:

docker-compose up

script bash avec docker-compose

chmod +x dev.sh

# Pour lancer en développement (par défaut)
./dev.sh

# Pour lancer en production
./dev.sh production

Project Structure

src/
├── application/          # Application layer
│   └── use-cases/        # Business use cases
├── domain/               # Domain layer
│   ├── message/          # Message domain
│   └── reservation/      # Reservation domain
├── interfaces/           # Interface adapters
│   └── websockets/       # WebSocket gateway
└── index.ts              # Entry point

Available Scripts

  • dev: Start development server
  • build: Build production bundle
  • start: Start production server
  • test: Run tests
  • test:dev: Run tests in watch mode
  • lint: Run linter
  • format: Format code

About

The most basic TypeScript starter I could think of

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.2%
  • Dockerfile 14.3%
  • JavaScript 5.1%
  • Gherkin 3.4%
  • Shell 3.0%