{"id":18643871,"url":"https://github.com/iberasoft/mern-skeleton","last_synced_at":"2026-04-08T11:31:11.035Z","repository":{"id":84592881,"uuid":"298326434","full_name":"IberaSoft/mern-skeleton","owner":"IberaSoft","description":"☠️ A skeleton application with basic user CRUD and auth features","archived":false,"fork":false,"pushed_at":"2025-12-31T11:26:41.000Z","size":307,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T11:23:58.476Z","etag":null,"topics":["expressjs","material-ui","mongodb","nodejs","reactjs","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/IberaSoft.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":"2020-09-24T15:54:46.000Z","updated_at":"2025-12-31T11:26:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"44d64c15-5c7b-4ad0-8f71-189b80098468","html_url":"https://github.com/IberaSoft/mern-skeleton","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/IberaSoft/mern-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IberaSoft%2Fmern-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IberaSoft%2Fmern-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IberaSoft%2Fmern-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IberaSoft%2Fmern-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IberaSoft","download_url":"https://codeload.github.com/IberaSoft/mern-skeleton/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IberaSoft%2Fmern-skeleton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31553981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["expressjs","material-ui","mongodb","nodejs","reactjs","webpack"],"created_at":"2024-11-07T06:08:43.048Z","updated_at":"2026-04-08T11:31:11.026Z","avatar_url":"https://github.com/IberaSoft.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MERN Skeleton – Modern Template 🚀\n\nA production-ready MERN starter with **React 19 + TypeScript**, **Vite**, **Tailwind CSS v4**,\n**Express 5**, **MongoDB**, **Docker**, and **ESLint/Prettier**. It is also\n**shadcn/ui–ready**, so you can drop in a beautiful component library when you need it.\n\n---\n\n## 1. Tech stack\n\n- Frontend\n  - React 19 + TypeScript\n  - Vite (dev server \u0026 build)\n  - Tailwind CSS v4\n  - shadcn/ui–ready (CLI-based setup, not pre-installed components)\n- Backend\n  - Node.js (24+ recommended)\n  - Express 5\n  - MongoDB Node driver 7\n- Tooling\n  - TypeScript\n  - ESLint (flat config) + Prettier\n  - Docker \u0026 docker-compose\n\n---\n\n## 2. Prerequisites 🔧\n\n- Node.js **24+** and npm\n- Docker \u0026 Docker Compose (for containerized workflows)\n- MongoDB (only required locally if you *don’t* use Docker for the DB)\n\n---\n\n## 3. Local development (no Docker) 🧑‍💻\n\n1. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n2. **Configure backend environment**\n   ```bash\n   cp .env.example .env.local\n   ```\n   Adjust values as needed, for example:\n   - `PORT=4000`\n   - `MONGODB_URI=mongodb://localhost:27017/mern_skeleton_local`\n\n3. **Configure frontend environment (optional)**\n   ```bash\n   cp client/.env.example client/.env.local\n   ```\n   - Default: `VITE_API_BASE_URL=http://localhost:4000`\n\n4. **Run backend + frontend together**\n   ```bash\n   npm run dev\n   ```\n   - Vite dev server: http://localhost:5173\n   - API health check: http://localhost:4000/api/health\n\n5. **Code formatting \u0026 linting**\n   ```bash\n   # Check lint errors\n   npm run lint\n\n   # Fix what can be auto-fixed\n   npm run lint:fix\n\n   # Format with Prettier\n   npm run format\n   ```\n\n---\n\n## 4. Local development with Docker 🐳\n\n1. **Create a local env file**\n   ```bash\n   cp .env.example .env.local\n   ```\n   Ensure `MONGODB_URI` points to the `mongo` service defined in\n   `docker-compose.local.yml`, for example:\n   ```env\n   MONGODB_URI=mongodb://mongo:27017/mern_skeleton\n   PORT=3000\n   NODE_ENV=production\n   ```\n\n2. **Build \u0026 run containers**\n   ```bash\n   docker compose -f docker-compose.local.yml up --build\n   ```\n\n3. **Access the app**\n   - App: http://localhost:3000\n   - API health: http://localhost:3000/api/health\n\n4. **Stop containers**\n   ```bash\n   docker compose -f docker-compose.local.yml down\n   ```\n\n---\n\n## 5. Production build \u0026 run 🚀\n\n### 5.1. Without Docker\n\n1. **Build client \u0026 server**\n   ```bash\n   npm run build\n   ```\n\n2. **Run in production mode**\n   ```bash\n   npm start\n   ```\n\n3. **Visit the app**\n   - Default: http://localhost:3000\n\nEnsure you have a production-ready `.env` file (e.g. `.env.production`) or\nset environment variables directly when starting the server.\n\n### 5.2. With Docker\n\n1. **Build the image**\n   ```bash\n   docker build -t mern-skeleton .\n   ```\n\n2. **Run the container**\n   ```bash\n   docker run \\\n     --env-file .env.local \\\n     -p 3000:3000 \\\n     mern-skeleton\n   ```\n\n---\n\n## 6. Enabling shadcn/ui 🎨\n\nshadcn/ui is not pre-installed, but the project is configured to work\nsmoothly with it (Vite + TS + Tailwind).\n\n1. **Install shadcn CLI (per project)**\n   ```bash\n   npx shadcn@latest init\n   ```\n\n2. **Follow the prompts**\n   - Choose **Vite + React + TypeScript**\n   - Use `client/src` as your source directory\n   - Use the alias `@/components` when asked for the components path\n\n3. **Add your first component**\n   ```bash\n   npx shadcn@latest add button\n   ```\n\n4. **Use it in your app** (example)\n   ```tsx\n   import { Button } from '@/components/ui/button'\n\n   export function Example() {\n     return \u003cButton\u003eClick me\u003c/Button\u003e\n   }\n   ```\n\n---\n\n## 7. Project structure 🗂️\n\n- `client/`\n  - `index.html` – Vite HTML entry\n  - `src/`\n    - `main.tsx` – React entry point\n    - `App.tsx` – Main app shell\n    - `index.css` – Tailwind entry\n- `server/`\n  - `server.ts` – Express API + static file server for production\n- `dist/`\n  - `server/` – Compiled server output (after `npm run build`)\n- `Dockerfile` – Multi-stage app image\n- `docker-compose.local.yml` – App + Mongo for local Docker dev\n- `tsconfig*.json` – TypeScript configuration\n- `eslint.config.mjs` – ESLint flat config\n- `.prettierrc` – Prettier config\n\n---\n\n## 8. Common workflows ⚙️\n\n- **Start dev mode (no Docker)**\n  ```bash\n  npm run dev\n  ```\n\n- **Build for production**\n  ```bash\n  npm run build\n  ```\n\n- **Run production build**\n  ```bash\n  npm start\n  ```\n\n- **Run Docker stack locally**\n  ```bash\n  docker compose -f docker-compose.local.yml up --build\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiberasoft%2Fmern-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiberasoft%2Fmern-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiberasoft%2Fmern-skeleton/lists"}