Skip to content

lewcode/ts-sylvera-api

Repository files navigation

Sylvera typescript API Application

A modern api with comprehensive tooling including linting, formatting, testing, and development automation. Currently serves project data

Features

  • TypeScript: Strict type checking with modern ES2020 features
  • Jest: Comprehensive testing framework with coverage reporting
  • Development Tools: Hot reload with nodemon and ts-node
  • Build System: TypeScript compiler with source maps and declarations

Getting Started

Prerequisites

  • Node.js 16.0.0 or higher
  • npm

Installation

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

Prisma

Prisma is used here as database ORM

  1. To generate the prisma schema
npx prisma generate
  1. To view the database in prisma's browser studio
npx prisma studio

Further information available at https://www.prisma.io/docs/orm/overview/introduction

Development

Start the development server with hot reload:

npm run dev

Building

Build the project for production:

npm run build

Running

Run the built application:

npm start

Scripts

  • npm run dev - Start development server with hot reload
  • npm run build - Build the project
  • npm start - Run the built application
  • npm test - Run tests
  • npm run test:watch - Run tests in watch mode
  • npm run test:coverage - Run tests with coverage report
  • npm run format - Format code with Biome
  • npm run clean - Clean build directory

Project Structure

src/
├── index.ts           # Main application entry point

tests/                 # Test files
└── server.spec.ts

Configuration files:
├── tsconfig.json      # TypeScript configuration
├── jest.config.js     # Jest testing configuration
├── biome.json        # Biome configuration
└── package.json       # Project dependencies and scripts

Code Quality

This project uses several tools to maintain code quality:

  • TypeScript: Provides static type checking
  • Biome: Formatting
  • Jest: Ensures code works as expected through comprehensive testing

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: npm test
  5. Format code: npm run format
  6. Submit a pull request

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published