A flashcard app running Next.js, Tailwind CSS and MongoDB Atlas.
This project is for demonstration purposes only.
- 👉 Navigate flashcard sets by topic and sub-topic
- 👀 View flashcard listing for any set
- ✅ Test your knowledge with a multiple-choice quiz
Signed-in users get access to the following.
- ✏️ Create and manage your own flashcard set
- 🔗 Link/Unlink any flashcard set to your account
- 📓 Study flashcards (based on SM-2 algorithm)
- Node >= v14.17.6.
- Yarn v1.22.11 (optional)
First, fork the project to your GitHub account.
$ git clone https://github.com/[your_github_username]/memowise.git
$ cd memowise
$ yarn # or npm i
Copy .env.example
to .env
. Then, set the values as described below.
Memowise uses MongoDB. Provide connection credentials to the following variables.
DB_USER
- db user nameDB_PASS
- db user's passwordDB_NAME
- db nameDB_URI
- the connection string to db
NEXTAUTH_URL
- for local dev, usehttp://localhost:3000
SECRET
- any value
Currently, Memowise only uses GitHub for authentication. Assign GitHub OAuth credentials to the following variables.
GITHUB_ID
GITHUB_SECRET
Memowise includes a simple cli to load default data.
$ yarn db --help
Usage: yarn db [options]
Options:
--user=<id> Set user's 'decks' field
--data Load topics, sub-topics and decks
-h, --help
Note:
--data
drops all collections and reloads data from ./src/data/seed.js.--user
assigns 3 decks touser.linked
and 3 decks touser.created
Follow these steps:
- Load the database via:
yarn db --data
- Run the application and sign-in via GitHub
- Retrieve your newly created user id in MongoDB
- Setup default linked/created decks for user id via:
yarn db --user=<id>
# development
$ yarn dev
or...
# build & run
$ yarn build
$ yarn start
Then, navigate to http://localhost:3000
.