Note
The project is currently in active development, so occasional issues or disruptions can be expected.
To run this project locally, follow the steps below:
-
Fork the repository to your GitHub account.
-
Clone the forked repository to your local machine:
git clone https://github.com/yoyocharlie/cs-flashcards-open.git
cd cs-flashcards-open
-
Install the necessary dependencies using
pnpm:pnpm install
-
Create a
.envfile in the root directory. You can copy the contents of.env.exampleto start with. -
Configure your environment variables in the
.envfile. The project is configured to use NextAuth with the Google auth provider. You will need to set upGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET. -
Instructions for setting up credentials with Google can be found here.
Note
In the Google dev console, your authorized URI for development will be http://localhost:3000/api/auth/callback/google
-
Push the Prisma schema to your SQLite database:
pnpm db:push
-
Start the development server:
pnpm dev
-
Your application should now be running on
http://localhost:3000.
-
To open Prisma Studio and manage your database visually:
pnpm db:studio
-
To generate Prisma client and run migrations:
pnpm db:generate pnpm db:migrate
You can run this project using Docker for easier setup and consistency across environments.
docker-compose up --buildEnsure you have the necessary environment variables set up in a .env file or export them in your shell before running the Docker container:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Once the container is up and running, you can access the application at http://localhost:3000.
