{"id":26659161,"url":"https://github.com/donxito/backend-booknotes","last_synced_at":"2026-02-11T01:34:16.447Z","repository":{"id":233968725,"uuid":"788107240","full_name":"donxito/backend-booknotes","owner":"donxito","description":"Mini Book Club Rest API Server","archived":false,"fork":false,"pushed_at":"2025-02-04T12:35:52.000Z","size":120,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T10:18:17.143Z","etag":null,"topics":["api","axios","express","mern-stack","mongodb","mongoose","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"https://bookclub-api.adaptable.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donxito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T19:38:22.000Z","updated_at":"2025-02-04T12:35:55.000Z","dependencies_parsed_at":"2024-09-15T21:35:02.576Z","dependency_job_id":"5259b186-82ea-4845-9d85-e365b0f56390","html_url":"https://github.com/donxito/backend-booknotes","commit_stats":null,"previous_names":["donxito/backend-booknotes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donxito%2Fbackend-booknotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donxito%2Fbackend-booknotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donxito%2Fbackend-booknotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donxito%2Fbackend-booknotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donxito","download_url":"https://codeload.github.com/donxito/backend-booknotes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413916,"owners_count":21099379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","axios","express","mern-stack","mongodb","mongoose","nodejs","rest-api"],"created_at":"2025-03-25T10:18:21.246Z","updated_at":"2026-02-11T01:34:11.414Z","avatar_url":"https://github.com/donxito.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mini Book Club (Backend Server)\n\nThis is the Mini Book Club backend (express API) repo.\n\n- Backend live server: [Backend live server](https://bookclub-api.adaptable.app)\n\n\n## Description\n\nMini Book Club is a Full-stack application using the MERN stack (MongoDB, Express, React, and Node.JS)\nThis repository contains the backend code for the server of this application. It is a RESTful API built with ExpressJS, MongoDB, and Mongoose.\n\nIt's a gift for my wife and her book reading club. My Mini Book Club is a place where you can share notes of your favourite books and also ratings. It allows logged-in users to manage all the books, authors and notes that they own in the database doing full CRUD. Anonymous users can see the books, authors and notes.\n\n## Features\n\n- Book Listing: Display a list of books you have read.\n- Adding New Entries: Add new book entries with details such as ISBN, title, author, description, review, and rating.\n- Review Update: Update book reviews.\n- Book Deletion: Delete books along with associated notes.\n- Notes: View, add, update and delete notes for each book.\n\n\n## Technical details:\n\n- REST API backend built with ExpressJS, MongoDB, and Mongoose.\n- REST API backend with routes that perform all CRUD actions for two models (books and authors).\n- Backend validation and centralized error handling the REST API.\n\n- SPA frontend, built with React, consisting of multiple views and implementing all CRUD actions.\n- Include sign-up, log-in, and log-out functionality with encrypted passwords and authorization (logged-in users can do additional things).\n\n## Express Server Setup\n- The server setup is implemented using Express.js, and the configuration is defined in the index.js file.\n\n## API Interaction\n\n- When submitting a new book entry, cover images are fetched from the Open Library Covers API using Axios. A fetchAndSaveCover function fetches the images and saves them to the project folder.\n\n\n## Frontend\n\n- Deployed live version: [Live demo](https://minibookclub.netlify.app)\n\n- Frontend client repo: [Frontend Client Repo](https://github.com/donxito/frontend-booknotes)\n\n## Instructions\nTo run on your computer, follow these steps:\n1. Clone the repository.\n2. Install dependencies: `npm install`.\n3. Create a `.env` file with the following environment variables:\n    - `PORT=\u003cyour-port\u003e` (5005)\n    - `ORIGIN=http:/http://localhost:5173/`\n    - `TOKEN_SECRET=\u003cyour-token-secret\u003e`\n4. Run the application: `node server.js`.\n\n\n## Environment variables\n\n### Hosted on your localhost:\n\nAdd the following environment variables in `.env` files:\n\n#### Server\n- `PORT=\u003cyour-port\u003e` (5005)\n- `ORIGIN=http:/http://localhost:5173/`\n- `TOKEN_SECRET=\u003cyour-token-secret\u003e`\n\n\n#### Client\n- `VITE_APP_URL=http://localhost:5005`\n\n\n### Creating your own deployment\n\n#### Backend using adaptable.io\n\n- `TOKEN_SECRET=\u003cyour-token-secret\u003e`\n- `MONGODB_URI=mongodb+srv://\u003cyour-mongodb-atlas-password-+-name-of-db\u003e`\n- `ORIGIN=\u003cyour-netlify-app-domain\u003e`\n\n\n#### Fronted using netlify.app\n\n- `CI=false` (required for SPA applications deployed on this service to redirect requests to index.html)\n- `VITE_API_URL=\u003cyour-adaptable-app-domain\u003e`\n\n\n\n### API Routes\n\n##### Books routes\n\n| HTTP verb | URL                    | Request body | Action                      |\n| --------- | -----------------------| ------------ | ----------------------------|\n| GET       | `/books`               | (empty)      | Returns all the books       |\n| POST      | `/books`               | JSON         | Adds a new book             |\n| GET       | `/books/:booksId`      | (empty)      | Returns the specified book  |\n| PUT       | `/books/:booksId`      | JSON         | Edits the specified book    |\n| DELETE    | `/books/:booksId`      | (empty)      | Deletes the specified book  |\n-----------------------------------------------------------------------------------\n\n##### Authors routes\n\n| HTTP verb | URL                   | Request body | Action                       |\n| --------- | ----------------------| ------------ | ---------------------------- |\n| GET       | `/authors`            | (empty)      | Returns all the authors      |\n| POST      | `/authors`            | JSON         | Adds a new author            |\n| GET       | `/authors/:authorsId` | (empty)      | Returns the specified author |\n| PUT       | `/authors/:authorsId` | JSON         | Edits the specified author   |\n| DELETE    | `/authors/:authorsId` | (empty)      | Deletes the specified author |\n----------------------------------------------------------------------------------\n\n##### User routes\n\n| HTTP verb | URL             | Request body | Action                      |\n| --------- | ----------------| -------------| ----------------------------|\n| GET       | `/user/:userId` | (empty)      | Returns the specified user  |\n| PUT       | `/user/:userId` | JSON         | Edits the specified user    |\n| DELETE    | `/user/:userId` | (empty)      | Deletes the specified user  |\n---------------------------------------------------------------------------\n\n##### Auth routes\n\n| HTTP verb | URL            | Request Headers                 | Request Body              |\n| --------- | -------------- | ------------------------------- | ------------------------- |\n| POST      | `/auth/signup` | --                              | { email, password, name } |\n| POST      | `/auth/login`  | --                              | { email, password }       |\n| GET       | `/auth/verify` | Authorization: Bearer \\\u003c JWT \\\u003e | --                        |\n--------------------------------------------------------------------------------------------","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonxito%2Fbackend-booknotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonxito%2Fbackend-booknotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonxito%2Fbackend-booknotes/lists"}