Bookclub is your place to discuss, track, and review books with the internet.
Inspired by other social platforms such as Goodreads and X, Bookclub is built to be a community for bookworms on the internet.
- Check it out here: bookclub.social
Bookclub is built with the following tools:
- Web Framework: Next.js
- Styling: Tailwind CSS and shadcn/ui
- Backend: tRPCand Upstash
- Database: Neon and Drizzle ORM
- Authentication: Auth.js
- Deployment: Vercel
To get started contributing to Bookclub, it is assumed you have Node.js and npm installed along with necessary environment variables as listed in the .env.example
file.
-
Fork and clone this repository using
git clone
. -
Install npm packages.
npm install
-
Create and populate a
.env
file based off of.env.example
. -
Run the following command to apply all database migrations to your database branch.
npm run db:migrate
- Run the seed script to populate your database branch with some initial data.
npm run db:seed
- Run the following command to start a local development server.
npm run dev
- Run the following command to open the Drizzle database studio to easy view and modify data in your database branch.
npm run db:studio
- Run the following command to format the codebase using Prettier. Try to do this before every commit. You can also download the Prettier VS Code extension to format your code automatically on save.
npm run format
Bookclub uses migrations powered by Drizzle Kit to make changes to the database schema. When a pull request is merged, the database migrations are automatically applies to the production database.
- After making and saving your changes to
schema.ts
, generate your migration file with the following command.
npm run db:generate
- If at anytime you want to remove a migration file, that can be done with the following command. This deletes the migration file, but it does not revert the changes made to the database branch. Migration rollbacks are not supported by Drizzle Kit yet, so if you have already run the migration, you will need to manually revert the changes made to the database branch.
npm run db:drop
- Run all migrations with the following command to update your database branch schema.
npm run db:migrate