The objective of this project is to use spaced repetition to remember things.
You create Decks
and every deck has Cards
. The cards can be in different "levels", from 1 to 5. Cards in different levels, has different frecuencies to show up in the application. Cards in level:
- are shown every day
- are shown every 3 days
- are shown every 7 days
- are shown every 15 days
- are shown every 30 days
This is the file where it is configured.
All cards start in level 1. Every time you reply a card ok, it will go to the next level (you will answer it less frecuently). If you reply wrong, it will go to level 1 again.
You can learn about space repetition here and here.
This project is deployed here with Vercel and Heroku for the database.
Technologies used for this project
- This is a Next.js project bootstrapped with
create-next-app
. - The ORM used is Prisma
- Vercel for the deployment
- Heroku for the database
- Ant Design as the react component library.
- Typescript, obviously.
- CSS Modules
- Clone this repository:
git clone [email protected]:danimontanaro/nowports-phone-book-app.git
- Install dependencies:
yarn
# or
npm i
- Create
.env
file file in the root of the project with the following variables:
DB_URL=file:./dev.db # if you are going to use sqlite
NEXT_PUBLIC_HOST=http://localhost:3000
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
NEXTAUTH_SECRET= # for local testing set any number here
NEXTAUTH_URL=http://localhost:3000
- For
GITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
follow this instructions:
- Go to your GitHub settings. Select Applications > Developer applications tab.
- Pick an existing application or hit Register new application.
- Set a few parameters for your application and get the Client ID and Client Secret.
- After that, with the Client ID and Client secret you can set these variables.
-
Change provider variable in schema.prisma file
provider = "sqlite"
-
Set your Database in the .env file, setting the DB_URL
DB_URL=postgres://davidpaley@localhost:5432/davidpaley # if you are using local sqlite
- Run the following command to create your database file.
npx prisma migrate dev`
If you are using a deployed postgres DB, you could use this command to initialize the DB:
npx prisma db push --preview-feature
// https://github.com/prisma/prisma/issues/4571
- Start the REST API server running
yarn dev
# or
npm run dev
The server is now running on http://localhost:3000.