Skip to content

nicholasdly/bookclub

Repository files navigation

Bookclub - The social platform for bookworms

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.

Development

Bookclub is built with the following tools:

Prerequisites

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.

Installation

  1. Fork and clone this repository using git clone.

  2. Install npm packages.

npm install
  1. Create and populate a .env file based off of .env.example.

  2. Run the following command to apply all database migrations to your database branch.

npm run db:migrate
  1. Run the seed script to populate your database branch with some initial data.
npm run db:seed
  1. Run the following command to start a local development server.
npm run dev
  1. Run the following command to open the Drizzle database studio to easy view and modify data in your database branch.
npm run db:studio
  1. 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

Database Migrations

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.

  1. After making and saving your changes to schema.ts, generate your migration file with the following command.
npm run db:generate
  1. 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
  1. Run all migrations with the following command to update your database branch schema.
npm run db:migrate

About

The social platform for bookworms. 📚

Resources

Stars

Watchers

Forks

Releases

No releases published