Skip to content

RestroHQ/backend

Repository files navigation

RestroHQ API

An all-in-one SaaS solution for restaurants including POS, menu management, order management, reservations, customer management, and reviews.

📑 Table of Contents

🚀 Tech Stack

Core Technologies

Authentication & Validation

📚 Helpful Articles & Resources

Architecture & Best Practices

Database & Prisma

Authentication & Security

🏗️ Project Structure

├── prisma/
│   ├── migrations/
│   ├── schema.prisma
│   └── migration_lock.toml
├── src/
│   ├── api/
│   │   └── v1/
│   │       ├── controllers/
│   │       ├── middlewares/
│   │       ├── routes/
│   │       ├── schemas/
│   │       └── services/
│   ├── utils/
│   │   ├── config.js
│   │   ├── prisma.js
│   │   └── seed.js
│   └── index.js
├── .babelrc
├── .env
├── .eslintrc
├── .prettierrc
└── package.json

📦 Package Management

📝 Package Management Guidelines

Adding Dependencies

# Add production dependency
pnpm add [package-name]

# Add development dependency
pnpm add -D [package-name]

# Add global dependency
pnpm add -g [package-name]

Updating Dependencies

# Check for updates
pnpm update --interactive

# Update all dependencies
pnpm update

# Update specific package
pnpm update [package-name]

Managing pnpm

# View pnpm version
pnpm -v

# Upgrade pnpm itself
pnpm add -g pnpm

# Clean dependencies
pnpm store prune

Why pnpm over npm/yarn?

  1. Disk Space Efficiency: pnpm creates a single content-addressable storage for all packages, significantly reducing disk space usage.
  2. Security: Prevents phantom dependencies by using strict package resolution.
  3. Performance: Faster installation times compared to npm and yarn.
  4. Monorepo Support: Built-in support for monorepos without additional tools.

🤝 Contributing

  1. Create a feature branch from main
  2. Commit your changes following Commit Message Convention
  3. Push your branch and create a Pull Request
  4. Ensure CI passes and get code review

📝 Commit Message Convention

This website follows Conventional Commits

Commit message will be checked using husky and commit lint, you can't commit if not using the proper convention below.

Format

<type>(optional scope): <description> Example: feat(pre-event): add speakers section

1. Type

Available types are:

  • feat → Changes about addition or removal of a feature. Ex: feat: add table on landing page, feat: remove table from landing page
  • fix → Bug fixing, followed by the bug. Ex: fix: illustration overflows in mobile view
  • docs → Update documentation (README.md)
  • style → Updating style, and not changing any logic in the code (reorder imports, fix whitespace, remove comments)
  • chore → Installing new dependencies, or bumping deps
  • refactor → Changes in code, same output, but different approach
  • ci → Update github workflows, husky
  • test → Update testing suite, cypress files
  • revert → when reverting commits
  • perf → Fixing something regarding performance (deriving state, using memo, callback)
  • vercel → Blank commit to trigger vercel deployment. Ex: vercel: trigger deployment

2. Optional Scope

Labels per page Ex: feat(pre-event): add date label

*If there is no scope needed, you don't need to write it

3. Description

Description must fully explain what is being done.

Add BREAKING CHANGE in the description if there is a significant change.

If there are multiple changes, then commit one by one

  • After colon, there are a single space Ex: feat: add something
  • When using fix type, state the issue Ex: fix: file size limiter not working
  • Use imperative, and present tense: "change" not "changed" or "changes"
  • Don't use capitals in front of the sentence
  • Don't add full stop (.) at the end of the sentence

🐳 Docker Support

Windows

# Install Docker Desktop for Windows first
# Build container
docker build -t restrohq .

# Run container
docker run -p 3000:3000 restrohq

Linux/macOS

# Build container
docker build -t restrohq .

# Run container
docker run -p 3000:3000 restrohq

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages