A TypeScript-based REST API service for managing event seating arrangements, built with Express.js.
- Event management with venue assignments
- Guest management with party size tracking
- Table assignments with seat number tracking
- Venue management with floor plan support
- In-memory data storage (no database required)
/
├── apps/
│ └── api/
│ ├── src/ # Source code directory
│ ├── dist/ # Compiled output
│ ├── coverage/ # Test coverage reports
│ ├── jest.config.js # Jest test configuration
│ ├── package.json # API-specific dependencies
│ └── tsconfig.json # API-specific TypeScript config
├── docs/ # Documentation files
├── dist/ # Project build output
├── coverage/ # Project-wide test coverage
├── .github/ # GitHub configuration files
├── .yarn/ # Yarn package manager files
├── node_modules/ # Project dependencies
├── jest.config.js # Project-wide Jest configuration
├── tsconfig.json # Root TypeScript configuration
├── package.json # Project dependencies and scripts
├── yarn.lock # Yarn dependency lock file
├── nodemon.json # Nodemon configuration
├── codecov.yml # CodeCov configuration
└── LICENSE # Project license file
- Install dependencies:
yarn install- Development:
# Start development server with auto-reload
yarn dev- Production:
# Build the TypeScript files
yarn build
# Start the production server
yarn startThe server will start on port 3000 by default.
GET /api/users- Get all usersGET /api/users/:id- Get user by IDPOST /api/users- Create new userPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/events- Get all eventsGET /api/events/:id- Get event by IDPOST /api/events- Create new eventPUT /api/events/:id- Update eventDELETE /api/events/:id- Delete eventGET /api/users/:userId/events- Get user's events
GET /api/venues- Get all venuesGET /api/venues/:id- Get venue by IDPOST /api/venues- Create new venuePUT /api/venues/:id- Update venueDELETE /api/venues/:id- Delete venue
GET /api/events/:eventId/guests- Get event guestsGET /api/events/:eventId/guests/:guestId- Get specific guestPOST /api/events/:eventId/guests- Create guestPUT /api/events/:eventId/guests/:guestId- Update guestDELETE /api/events/:eventId/guests/:guestId- Delete guest
GET /api/events/:eventId/tables/:tableId/assignments- Get table assignmentsPOST /api/events/:eventId/tables/:tableId/assignments- Create assignmentDELETE /api/events/:eventId/tables/:tableId/assignments/:guestId- Delete assignment
interface User {
id: string; // UUID
name: string; // Full name
email: string; // Email address
createdAt: Date; // Creation timestamp
updatedAt?: Date; // Last update timestamp
}interface Event {
id: string; // UUID
userId: string; // Owner's user ID
venueId: string; // Associated venue ID
type: EventType; // WEDDING | BIRTHDAY | CORPORATE | OTHER
title: string; // Event title
description?: string; // Optional description
date: string; // Event date (ISO string)
createdAt: Date; // Creation timestamp
updatedAt?: Date; // Last update timestamp
}interface Venue {
id: string; // UUID
name: string; // Venue name
address: string; // Physical address
capacity: number; // Maximum capacity
description?: string; // Optional description
map?: VenueMap; // Optional floor plan
createdAt: Date; // Creation timestamp
updatedAt?: Date; // Last update timestamp
}interface Guest {
id: string; // UUID
eventId: string; // Associated event ID
name: string; // Guest name
email?: string; // Optional email
status: GuestStatus; // INVITED | CONFIRMED | DECLINED | MAYBE
partySize: number; // Number of seats needed
createdAt: Date; // Creation timestamp
updatedAt?: Date; // Last update timestamp
}interface TableAssignment {
id: string; // UUID
eventId: string; // Associated event ID
tableId: string; // Table identifier
guestId: string; // Assigned guest ID
seatNumbers: number[]; // Assigned seat numbers
assignedAt: Date; // Assignment timestamp
createdAt: Date; // Creation timestamp
}All endpoints follow a consistent error response format:
interface ErrorResponse {
message: string; // Human-readable error message
code?: string; // Optional error code for specific scenarios
}Common error status codes:
- 400: Bad Request (invalid input)
- 404: Not Found
- 500: Internal Server Error
The project uses TypeScript for better type safety and developer experience. Key features:
- Strong typing for all entities and DTOs
- Type-safe Express.js route handlers
- UUID-based entity IDs with validation
- In-memory data storage with type safety
- Comprehensive validation rules
- Error handling with type checking
This project is licensed under the MIT License - see the LICENSE file for details.