{"id":23899160,"url":"https://github.com/fif0o/books-api","last_synced_at":"2026-04-13T14:31:52.049Z","repository":{"id":140925798,"uuid":"81668671","full_name":"FiF0o/books-API","owner":"FiF0o","description":"Simple RESTful API using Express, Mongo as backend and Isomorphic React as a front-end layer with websockets for live notifications and redux, sagas for state management and side effects. A GraphQL implementation is also available.","archived":false,"fork":false,"pushed_at":"2018-08-24T14:57:15.000Z","size":1299,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T12:26:30.734Z","etag":null,"topics":["graphql","mongodb","mongoose","prisma","react-server-render","reactjs","redux","redux-saga","rest-api","webpack","websockets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FiF0o.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-02-11T17:21:39.000Z","updated_at":"2024-04-14T12:26:30.735Z","dependencies_parsed_at":"2023-07-03T01:34:14.083Z","dependency_job_id":null,"html_url":"https://github.com/FiF0o/books-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiF0o%2Fbooks-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiF0o%2Fbooks-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiF0o%2Fbooks-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiF0o%2Fbooks-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FiF0o","download_url":"https://codeload.github.com/FiF0o/books-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240288667,"owners_count":19777706,"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":["graphql","mongodb","mongoose","prisma","react-server-render","reactjs","redux","redux-saga","rest-api","webpack","websockets"],"created_at":"2025-01-04T18:16:07.633Z","updated_at":"2025-10-29T17:13:35.915Z","avatar_url":"https://github.com/FiF0o.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Books-API\n\u003cbr\u003e\n\u003cbr\u003e\n\nThis is a simple server side App offering a web API as well as a front based a [GraphQL](https://graphql.org/) \u0026 [MongoDB](https://docs.mongodb.com/manual/installation/) implementations.\n\u003cbr\u003e\n- GraphQL implementation is available on the `graphql` branch as well as `master`.\n- MongoDB implementation available on `mongo` branch.\n\u003cbr\u003e\n\n\nThe front-end uses ReactJs and Material design css with [Material Components Web](https://material.io/develop/web/docs/getting-started/) library:\n- Redux for state management, Sagas for side-effects \u0026 Websocket for live updates on the `mongo` branch.\n- [PrismaDB](https://www.prisma.io/), Apollo is used on the `graphql` branch to interface with graphQL.\n\n## 1. Pre-requisites\n-----------------\nYou must add your `DATABASE` endpoints for your environments in the `config` directory.\n```\n./\n __config/\n  package.json\n .env\n ...\n```\n\u003cbr\u003e\u003cbr\u003e\nThe API is served by default on `PORT:3000`.\u003cbr\u003e\nThe Web app is served by default on `PORT:3001`.\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n### *1.1 Dependencies*\nYou must have MongoDB installed on your machine or PrismaDB.\n\u003cbr\u003e\n\u003cbr\u003e\n### *1.2 Environment*\nEnv variables are loaded with [dotenv](https://www.npmjs.com/package/dotenv).\u003cbr\u003e\nBefore running the project don't forget to add the following variables in your `.env` file.\u003cbr\u003e\n```\n// MongoDB variables for differents environments...\nDEV_DB\nPROD_DB\n\n\n// API endpoints, ports... for MongoDB, GraphQL\nAPI_PORT=\n\n// App env variables...\nAPP_PORT=\n\n// Prisma DB variables:  App \u0026 DB layers, Authentication/Encryption Token\nPRISMA_DB_ENDPOINT=\nPRISMA_DB_SECRET=\nPRISMA_CLUSTER=\nPRISMA_BEARER_TOKEN=\n\n```\n(_Refer_ to the `env` file for help)\n\u003cbr\u003e\n\u003cbr\u003e\n\n### 1.3 MongoDB implementation\n_[mongo shell](https://docs.mongodb.com/manual/mongo/) to test \u0026 debug._\u003cbr\u003e\n- Runs on `PORT:3000`\n- Routes \u0026 endpoints:\n  - `/api/books/`\n  - `/api/books/:id`\n  - `/api/genres/`\n  - `/api/genres/:id`\n- Mongoose ODM (Schema, Controllers):\n  ```\n    ./\n    __api/\n    ____resources/\n    ______ \u003cresource\u003e/\n    ________ index.js\n    ________ \u003cresource\u003e.controller.js\n    ________ \u003cresource\u003e.model.js\n    ________ \u003cresource\u003e.router.js\n    ...\n    ______ router.js\n    ______ index.js\n  ```\n\u003cbr\u003e\n\u003cbr\u003e\n\n### 1.4 GraphQL inplementation\n[GraphQL](https://www.howtographql.com/), [Prisma](https://www.prisma.io/) ORM.\u003cbr\u003e\n- Application layer (GraphQL):\n  ```\n  ./\n  __/api/\n  ____schema.graphql\n  ____index.js\n  ```\n- Database layer (Prisma \u0026 bindings):\n  ```\n  ./\n  __database/\n  ____datamodel.graphql\n  ____prisma.yml\n  ```\n\u003cbr\u003e\n\n_Additional documentation:_\n- _[init prisma service](https://www.prisma.io/docs/tutorials/setup-prisma/demo-server-ouzia3ahqu)._\n- _[deploy prisma \u0026 generated prisma.graphql](https://www.prisma.io/docs/quickstart/)._\n- _[prisma API](https://www.prisma.io/docs/reference/prisma-api/overview-ohm2ouceuj/)._\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 2. Commands\n- Running the project: `npm run start`\n- Developing: `npm run dev`\n- Running the web API: `npm run api`\n- Running the web server: `npm run server`\n- Bundling the artefacts: `npm run build`\n- _(optional)_ mongoDB cluster: `npm run db`\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 3. Next steps\n-------------\n - Testing.\n - CI/CD.\n - Styling on the `graphql` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffif0o%2Fbooks-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffif0o%2Fbooks-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffif0o%2Fbooks-api/lists"}