Code42Cate/hackathon-starter(opens in a new tab)
Language: TypeScript
Hackathon Starter Template (NextJS, Hono, ShadcnUI, Prisma, Postgres, Docker)
- stars
- 93
- watchers
- 2
- forks
- 16
- open issues
- 2
- Last updated
- 12/12/2024
Language: TypeScript
Hackathon Starter Template (NextJS, Hono, ShadcnUI, Prisma, Postgres, Docker)
This is my hackathon starter template, based on this awesome turborepo template.
It includes everything you need to get started in a single monorepo, including:
This is meant for hackathons, not for production apps! It's a great way to get started quickly, but you should probably not use it for anything serious.
Clone the repository:
git clone https://github.com/Code42Cate/hackathon-starter.git
Rename packages/database/.env.example to packages/database/.env
Start everything with docker-compose:
docker-compose watch
Push database schema:
pnpm turbo db:generate
Use the pre-made script:
pnpm install # if you haven't already pnpm ui:add <component-name>
This works just like the add command in the
shadcn/uiCLI.
Both the api (api.Dockerfile) and the web app (web.Dockerfile) are dockerized and managed by docker-compose (docker-compose.yml). You can start everything with:
docker-compose watch
This will start the api, the web app, and the database. It also enables hot reloading for both the api and the web app.
The database is a Postgres database managed by Prisma. It is reachable through this connection: postgres://postgres:postgres@localhost:5432/hackathon.
This Turborepo includes the following packages/apps:
web: a Next.js appapi: a Hono appdatabase: a stub Prisma library shared by both web and api appsui: a stub React component library powered by shadcn/uieslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)tsconfig: tsconfig.jsons used throughout the monorepoThanks to dan5py who created the original template :)
MIT