This is the backend repository for the Flashcard Study App. It provides RESTful APIs for creating and managing user accounts, flashcard decks, and flashcards.
To get started with the backend, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory and run
npm install
to install the dependencies. - Create a
.env
file in the root directory and add the following environment variables:
MONGO_USER=<your_mongo_username>
MONGO_PASSWORD=<your_mongo_password>
- Run npm start to start the server.
- The server should be running on http://localhost:3000.
- Node.js
- Express
- MongoDB
- JWT
POST /users - Create a new user GET /api/users - Get all users GET /api/users/:id - Get a user by ID PUT /api/users/:id - Update a user by ID DELETE /api/users/:id - Delete a user by ID PUT /api/users/:id/progress - Update a user's flashcard progress by ID
GET /api/cards - Get all flashcards GET /api/decks/:deckId/cards - Get all flashcards in a specific deck POST /api/cards - Create a new flashcard PUT /api/cards/:id - Update a flashcard by ID DELETE /api/cards/:id - Delete a flashcard by ID
GET /api/decks - Get all decks POST /api/decks - Create a new deck PUT /api/decks/:id - Update a deck by ID DELETE /api/decks/:id - Delete a deck by ID GET /api/decks/:deckId/cards/random/:quantity - Get a random selection of flashcards from a specific deck
- This backend was built as part of a larger flashcard study app project. The frontend was built using React Native, Expo, and Native Base, and is available in a separate repository.
- The project was inspired by the flashcard study method, a popular technique for memorizing information.
- Thanks to the Express, Mongoose, and jsonwebtoken communities for creating and maintaining the libraries used in this project