https://github.com/ivanms1/habanero
Project Habanero
https://github.com/ivanms1/habanero
Last synced: about 1 year ago
JSON representation
Project Habanero
- Host: GitHub
- URL: https://github.com/ivanms1/habanero
- Owner: ivanms1
- Created: 2023-01-05T16:35:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T10:39:18.000Z (about 3 years ago)
- Last Synced: 2025-03-25T00:42:33.339Z (about 1 year ago)
- Language: TypeScript
- Size: 1.32 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Habanero
## Technology stack
- Backend: [Node.js](https://nodejs.org/en/), [Express](https://expressjs.com/), [tRPC](https://trpc.io/) and [Prisma](https://www.prisma.io/)
- Frontend: [React.js](https://reactjs.org/), [Next.js](https://nextjs.org/) and [tRPC](https://trpc.io/)
## Monorepo Setup
- `apps/api`: [Express](https://expressjs.com/) app that hosts the [tRPC](https://trpc.io/) server.
- `apps/web`: Main app powered by [Next.js](https://nextjs.org).
- `apps/admin`: [Next.js](https://nextjs.org) app for admin purposes.
- `packages/ui`: Internal component library used by both `web` and `admin` applications.
- `packages/trpc`: Libary that exports [tRPC](https://trpc.io/) router and context for the apps in the monorepo to consume.
- `packages/auth`: Libary that exports [NextAuth.js](https://next-auth.js.org/) configuration for the apps in the monorepo to consume.
- `packages/config`: Libary that contains custom [eslint](https://eslint.org/) rules and the [tailwindcss](https://tailwindcss.com/) config for the monorepo.
- `packages/tsconfig`: Libary that contains custom [tsconfig](https://www.typescriptlang.org/tsconfig) rules for the monorepo.
## Requirements
- **Yarn**
This repository uses [Yarn](https://classic.yarnpkg.com/lang/en/) as a package manager.
- **Node.js**
This repository uses [Node.js](https://nodejs.org/en/) as a runtime environment. Version 18.0.0 or higher is required.
- **PostgreSQL Database**
To run the backend, a connection to a database is needed. The easiest way to run a Postgres DB locally is via [Docker](https://www.docker.com/).
Once you have Docker installed run this command:
```
docker run --detach --publish 5432:5432 -e POSTGRES_PASSWORD=postgres --name habanero postgres:10.12
```
## Running the app
- To install project deps, run
```
yarn app:install
```
- Initialize the database or sync the database schema
```
yarn db:push
```
- Generate the pr the prismas client and types
```
yarn db:generate
```
- Run app
- Start the backend
```
yarn dev:api
```
- Start backend + web
```
yarn dev:web
```
- Start backend + admin
```
yarn dev:admin
```
- Start backed + admin + web
```
yarn dev
```
## Running storybook
- To run storybook, run
```
yarn storybook
```