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:
- Next.js for the frontend
- Hono as lightweight backend
- shadcn/ui for the UI component library
- Prisma as ORM
- PostgreSQL as database
- Docker for containerization, with docker-compose watch for hot reloading
- TypeScript for static type checking
- Livecycle for instant sharing of your local development environment
- And some more of the usual goodies such as prettier, eslint, etc.
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/ui
CLI.
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 bothweb
andapi
appsui
: a stub React component library powered by shadcn/uieslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
Thanks to dan5py who created the original template :)
MIT