Skip to content

5-logic/the-sync-backend

Repository files navigation

TheSync Backend

Backend for TheSync - A modern API built with NestJS and TypeScript.

📑 Table of Contents

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/FiveLogic/the-sync-backend.git
    cd the-sync-backend
  2. Install dependencies:

    pnpm install --frozen-lockfile
  3. Setup environment variables:

    Create a .env file in the root directory and configure your environment variables following the Environment Setup Guide.

  4. Generate Prisma client and run migrations:

    pnpm prisma:generate
    pnpm prisma:dev
  5. Seed initial data:

    Seeding Data Guide - Complete guide for seeding initial data into the database

    pnpm seed
  6. Start the development server:

    pnpm start:dev
  7. The API will be available at http://localhost:4000/swagger.

Environment Setup

For detailed instructions on setting up environment variables and database configuration, please refer to our Environment Setup Guide.

🧰 Development Workflow

Required VS Code Extensions

For the best development experience, please install the following VS Code extensions:

You can install them by running:

code --install-extension EditorConfig.EditorConfig
code --install-extension esbenp.prettier-vscode
code --install-extension dbaeumer.vscode-eslint

Available Scripts

  • pnpm start:dev - Start the development server with hot-reload
  • pnpm build - Build the application for production
  • pnpm start - Start the server in development mode
  • pnpm start:prod - Start the production server
  • pnpm prisma:generate - Generate Prisma client
  • pnpm prisma:dev - Run database migrations in development
  • pnpm prisma:studio - Open Prisma Studio for database inspection
  • pnpm seed - Seed initial data into the database
  • pnpm lint - Run ESLint to check code quality

Tech Stack

Commit Conventions

We use conventional commit messages to ensure consistency and maintain a clean git history. This project enforces commit conventions using commitlint.

Commit Message Format

Each commit message should follow this format:

<type>: <description>

[optional body]

[optional footer(s)]

Allowed Types

Type Description
add Adding a new file, feature or dependency
update Updating existing functionality
fix Bug fixes
docs Documentation changes
feat New features
refactor Code refactoring without changing functionality
delete Removing code or files

Examples

feat: add user authentication controller
fix: resolve database connection issue
docs: update API documentation
refactor: improve error handling in auth service

🔍 Code Quality

We maintain code quality with:

  • ESLint: For code linting
  • Prettier: For code formatting
  • TypeScript: For type safety

📚 Documentation

📋 Changelog

For detailed information about changes in each version, please see our CHANGELOG.md.

About

Backend for TheSync

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages