- Notifications
You must be signed in to change notification settings - Fork0
Backend Server / API for Never Forget, a spaced repetition learning app.
License
tmns/never-forget-server
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Backend Server / API for Never Forget, a spaced repetition learning app. The server uses MongoDB as its data source, with GraphQL as the API query language. Apollo and Express handle the requests / responses.
The goal is for this to be used as a backend to a full stack spaced repetition learning app. In the meantime, a fully implemented CLI version is available to experiment with here:Never Forget CLI.
So far, all of the main functionality has been implemented. You can:
User
- Create a User (signup)
- Update a User (change username or password)
- Remove a User (delete account)
- Authenticate a User (login)
- Deauthenticate a User (logout)
- Appropriate authN & AuthZ checks on the above
Deck
- Get Deck(s)
- Create a Deck
- Update a Deck
- Remove a Deck
- Appropriate authN & AuthZ checks
Card
- Get Card(s)
- Create a Card
- Update a Card
- Remove a Card
- Appropriate authN & AuthZ checks
Study and Export / Import functionality will be implemented client side
To build,cd
to project root and run:
$ npm install && npm run build
This should install dependencies and then output a transpiled version of app.js tosrc/dist
. From there you can run the app directly like sonode dist/index.js
, which will launch the GraphQL server.
To configure the database url and server url / port, you can edit the values defined insrc/config/config.js
.
Runnode dist/index.js
, check out the GraphQL Playground's schema / docs, and then start playing around! The onlygotchas to watch out for is that every deck requires a unique name (for a given user) and every card requires a unique prompt (for a given user) and a target.
The source of this app may be used under the WTFPL - or, if you take issue with that, consider it to be under the CC0.
Feedback and contributions are welcome. Feel free to create issues, fork, submit pull requests, etc. However, if you make any changes to the application logic, make sure to run the full test suite before opening a PR.
To run tests, simply execute the following in the project root:
$ npm test
PR's that donot include output from the above command will be rejected automatically!
Finally, if you want to contribute in a different way, you can always buy me a coffee ^_^