Skip to content

TypeScript REST API exploring relational data modeling, service-layer architecture, and API design patterns for a travel platform.

Notifications You must be signed in to change notification settings

tamara-builds/adventure-life-api

Repository files navigation

Adventure Life Banner

Adventure Life API

A backend API for a fictitious travel company, built to model real-world backend concerns such as relational data modeling, validation, analytics-friendly schemas, and clear service boundaries. This project focuses on designing a maintainable, well-documented REST API rather than a front-end experience.


What This Project Demonstrates

  • Designing a REST API around a non-trivial domain (users, trips, cities, activities)
  • Modeling relational data with clear ownership and constraints
  • Separating concerns across controllers, services, and data access layers
  • Validating inputs and enforcing consistency at API boundaries
  • Producing documentation that makes the system easy to understand and test

This repo represents how I approach backend systems intended to grow over time: explicit structure, predictable behavior, and tooling that supports both developers and consumers of the API.


Tech Stack

  • Node.js with TypeScript
  • Express
  • PostgreSQL
  • Knex.js and Objection.js
  • Yup for request validation
  • Winston for structured logging
  • Swagger UI for API documentation
  • Postman for API testing

Project Structure

  • src/api – Controllers, services, DAOs, models, routes, and DTO validation
  • src/config – Environment configuration, Knex, Swagger setup
  • src/db – Migrations, seeds, and source data
  • src/loaders – Application startup and dependency initialization
  • src/docs – Swagger and Postman artifacts

The structure is designed to make responsibilities explicit and to keep business logic separate from transport and persistence concerns.


Local Setup

Requirements

  • Node.js
  • PostgreSQL

Installation

git clone git@github.com:tamara-builds/adventure-life.git
cd adventure-life
npm install
cp .env.example .env
npm run migrate
npm run seed
npm run build
npm run start

Database

  • Schema managed via Knex migrations
  • Seed data included for local development and testing
  • Reset command available for rapid iteration
npm run reset-db

API Documentation

Interactive Swagger documentation is available locally at:

http://localhost:<PORT>/api-docs

The API is fully documented, including request schemas, validation errors, and example responses.


Postman Collection

  • Collection file: adventure-life.postman_collection.json
  • Covers all routes, validation errors, and edge cases
  • Designed to support manual testing and exploration

To import, open Postman and upload the JSON file from src/docs.


Schema Overview

Adventure Life Schema

The schema emphasizes normalized relationships and clear join tables to support flexible querying and future feature expansion.


Author

👩🏽‍💻 Tamara Dowis GitHub | LinkedIn

About

TypeScript REST API exploring relational data modeling, service-layer architecture, and API design patterns for a travel platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published