{"id":18817030,"url":"https://github.com/darkzarich/nestjs-docs-cats-project","last_synced_at":"2026-04-17T01:32:17.617Z","repository":{"id":261636789,"uuid":"872155497","full_name":"Darkzarich/nestjs-docs-cats-project","owner":"Darkzarich","description":"Small fullstack project to try out some Nest.js concepts, examples from the docs, design patters and best practices as well as serving client side static content (for SPA).","archived":false,"fork":false,"pushed_at":"2024-11-23T17:45:53.000Z","size":731,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T23:45:34.071Z","etag":null,"topics":["fullstack","fullstack-development","nest","nestjs","nestjs-backend","react","reactjs","zustand"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Darkzarich.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-10-13T23:15:00.000Z","updated_at":"2024-11-23T17:45:56.000Z","dependencies_parsed_at":"2024-11-07T16:40:39.245Z","dependency_job_id":"8cfebd4d-f364-4ce3-a4cd-7cea47543e8c","html_url":"https://github.com/Darkzarich/nestjs-docs-cats-project","commit_stats":null,"previous_names":["darkzarich/nestjs-docs-cats-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkzarich%2Fnestjs-docs-cats-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkzarich%2Fnestjs-docs-cats-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkzarich%2Fnestjs-docs-cats-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkzarich%2Fnestjs-docs-cats-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Darkzarich","download_url":"https://codeload.github.com/Darkzarich/nestjs-docs-cats-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239753699,"owners_count":19691160,"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":["fullstack","fullstack-development","nest","nestjs","nestjs-backend","react","reactjs","zustand"],"created_at":"2024-11-08T00:08:47.668Z","updated_at":"2026-01-14T18:30:18.549Z","avatar_url":"https://github.com/Darkzarich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cats Project 🐾\n\n\u003cdetails\u003e\n  \u003csummary\u003eScreenshot\u003c/summary\u003e\n  \u003cdiv align=\"center\"\u003e\n\n  ![img](./screenshot.png)\n\n  \u003c/div\u003e\n\u003c/details\u003e\n\n## Description\n\nSmall fullstack project to try out some NestJS concepts, examples from the docs, design patters and best practices as well as serving client side static content (for SPA).\nTechnically, the project was not made from scratch, this is an extension of the project from the official NestJS docs with some additional features that were not originally present in the docs.\n\nFor the server side, the project uses [NestJS](https://nestjs.com/) + [MongoDB](https://www.mongodb.com/) as the database and [React](https://reactjs.org/) + [TypeScript](https://www.typescriptlang.org/) for the client side.\n\nKey features:\n\n- **CRUD** operations for Cats. Only authenticated users can create cats and only the owner can delete or update them.\n- JWT based **Authentication** (for demo reasons the token is valid for 60 seconds).\n- Implements **Repository Pattern** to work with the database models.\n\nThe project's [Hoppscotch](https://hoppscotch.io/) specification file is located in the `hoppscotch` directory.\n\n**NOTE**: Usually you'd serve the client side using a static file server like [Nginx](https://www.nginx.com/) or [Apache](https://httpd.apache.org/) but for the sake of simplicity, the project serves the client side from NestJS application. But during development, the client side will be served from [Vite](https://vitejs.dev/)'s dev server.\n\n## Project setup\n\nInstall both server and client dependencies\n\n```bash\n$ pnpm -r i\n```\n\nCopy and fill the `.env` file with the required environment variables, most importantly the `MONGODB_URL` variable:\n\n```bash\n$ cp .env.example .env\n$ nano .env\n```\n\nSince the project uses [MongoDB](https://www.mongodb.com/) as the database, you'll need to install the [MongoDB Community Server](https://www.mongodb.com/try/download/community) and start it.\nAlternatively, you can use Docker to run the MongoDB container:\n\n```bash\n# start the container\n$ docker run -d -p 27017:27017 mongo\n```\n\nAfter that you need to provide the MongoDB connection string in the `.env` file.\n\n## Scripts\n\n### Development\n\nTo work on both server and client sides at the same time run both separately in watch mode:\n\n#### Server (NestJS):\n\n```bash\n# server watch mode\n$ pnpm run start:dev\n```\n\n#### Client (React + TypeScript):\n\n```bash\n# client watch mode\n$ pnpm --prefix client dev\n```\n\n### Build\n\nSequence of commands to build and run the project for production:\n\n```bash\n# build the server\n$ pnpm build\n# build (copies dist to the server's dist/client folder)\n$ pnpm --prefix client build\n# run the server\n$ pnpm run start:prod\n\n```\n\n### Tests\n\n#### Server (NestJS):\n\n```bash\n# unit tests\n$ pnpm run test\n\n# e2e tests\n$ pnpm run test:e2e\n\n# test coverage\n$ pnpm run test:cov\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkzarich%2Fnestjs-docs-cats-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkzarich%2Fnestjs-docs-cats-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkzarich%2Fnestjs-docs-cats-project/lists"}