{"id":50679082,"url":"https://github.com/htmujahid/full-stack-nestjs","last_synced_at":"2026-06-08T17:05:06.090Z","repository":{"id":347940768,"uuid":"1182249061","full_name":"htmujahid/full-stack-nestjs","owner":"htmujahid","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-30T05:07:22.000Z","size":905,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T07:42:06.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/htmujahid.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T08:52:13.000Z","updated_at":"2026-03-30T05:07:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/htmujahid/full-stack-nestjs","commit_stats":null,"previous_names":["htmujahid/full-stack-nestjs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/htmujahid/full-stack-nestjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Ffull-stack-nestjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Ffull-stack-nestjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Ffull-stack-nestjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Ffull-stack-nestjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htmujahid","download_url":"https://codeload.github.com/htmujahid/full-stack-nestjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Ffull-stack-nestjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34071738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-08T17:05:01.855Z","updated_at":"2026-06-08T17:05:06.085Z","avatar_url":"https://github.com/htmujahid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crude\n\nFull-stack monorepo: **NestJS** backend + **React + Vite** frontend, served from a **single port**.\n\n## Single-port architecture\n\nBackend and frontend run on the **same port** (default `3000`) in both development and production. No separate dev servers, no proxy config, no CORS headaches.\n\n- **API routes** (`/api/*`) → NestJS handles them\n- **Everything else** → Vite (dev) or static client build (prod)\n\nBecause the browser talks to one origin, CORS is a non-issue: same-origin requests require no special headers or configuration.\n\n## Stack\n\n- **Backend**: NestJS 11, Express 5, TypeScript\n- **Frontend**: React 19, Vite 7, TypeScript\n- **Package manager**: pnpm\n\n## Project layout\n\n```\n├── server/          # NestJS backend (API, Vite middleware)\n├── client/          # React frontend\n├── index.html       # Root HTML (loads /client/main.tsx)\n└── vite.config.ts   # Vite config (builds to dist/client)\n```\n\n## Scripts\n\n| Command        | Description                            |\n|----------------|----------------------------------------|\n| `pnpm start:dev` | Dev mode: Nest + Vite HMR on port 3000 |\n| `pnpm build`     | Builds server + client                 |\n| `pnpm start:prod`| Runs prod server (static client + API) |\n| `pnpm lint`      | Lint client \u0026 server                   |\n\n## How it works\n\n**Development**\n\n- NestJS starts with watch mode.\n- `ViteMiddleware` mounts Vite in middleware mode. First non-API request initializes the dev server lazily.\n- `/api/*` → NestJS controllers; all other GET requests → Vite (HMR, transforms).\n\n**Production**\n\n- `pnpm build` emits NestJS to `dist/server` and Vite to `dist/client`.\n- `ViteMiddleware` serves static files from `dist/client` with SPA fallback to `index.html`.\n- `/api/*` still hits NestJS; static assets and SPA routes from Express.\n\nSingle process, single port, no CORS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtmujahid%2Ffull-stack-nestjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtmujahid%2Ffull-stack-nestjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtmujahid%2Ffull-stack-nestjs/lists"}