Leitner is a free and open source piece of software which allows users to create flashcards and create quizes from these flashcards, and then study those quizzes. It is based on the Leitner studying system of spaced repetition.
Leitner is built using Typescript, MongoDB, React, Express and Node.
For the licence, please see LICENCE.md.
For version history and the changelog, please see CHANGELOG.md
For information on contributing to this project, please see CONTRIBUTING.md.
- Have a MongoDB instance set-up locally.
- Run
cd server && npm i
. - Create your
.env
file in theserver/
directory, based off of the.env.example
To run the server, run npm run start
.
- Follow the steps above to have the server running.
- Run
cd client && npm i
. - Create your
.env
file in theclient/
directory, based off of the.env.example
.
To run the client, run npm run start
.
Notes:
By default the front-end / client runs on port 3000
, if you wish to change this go into client/package.json
and change the following line:
"start": "npm run start",
to
"start": "set PORT=<PORT NUMBER YOU WANT TO RUN> && npm run start",
(for windows)
"start": "PORT=<PORT NUMBER YOU WANT TO RUN> && npm run start",
(for mac / linux)
e.g.
"start": "cd client && set PORT=4234 && npm run start",
In most cases you can skip this step.
- Follow the steps above to have the server and client running.
- Run
cd e2e && npm i
To run the end-to-end tests in visual mode, run npm run cypress:open
.
Field | Meaning | Example |
---|---|---|
MONGO_URL |
The URL of the mongo instance | mongodb://127.0.0.1 |
DB_NAME |
The name of the mongo database which stores leiter data | leitner |
SERVER_HOST |
The host of the server part of the software (started usign npm run start:server ). For testing you will want this set to localhost |
localhost |
SERVER_PORT |
The port of the server part of the software (started using npm run start:server ). For testing you will want this set to 3001 |
3001 |
CLIENT_HOST |
The host domain for the client / front-end | localhost if running locally |
CLIENT_PORT |
The port the client runs on (only used for E2E tests) | 3000 |
- Follow the Server section in the Set-up section above.
- Run
cd server/
. - Run
npm run tsc && npm run lint && npm run test
.
- Follow the Client section in the Set-up section above.
- Run
cd client/
- Run
npm run tsc && npm run lint && npm run test
.
- Follow the End-to-End Tests section in the Set-up section above.
- Run
cd e2e
. - Run
npm run lint
. - Run
npm run cypress:run
.
The client and server linting, tsc and test steps are ran automatically on pushing commits; the e2e linting steps are also ran automatically on commits, but the end to end tests themselves are not.
- Donations to support this project - or even just to say thanks - are welcome here. Please donate via my Kofi page.