{"id":21663011,"url":"https://github.com/datvt243/nodejs-resume-api-ts","last_synced_at":"2026-04-07T23:31:08.557Z","repository":{"id":252214583,"uuid":"838809173","full_name":"datvt243/nodejs-resume-api-ts","owner":"datvt243","description":"Learning Node.js Express, Project create resume API","archived":false,"fork":false,"pushed_at":"2026-04-04T11:30:51.000Z","size":1022,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-04-04T11:35:29.788Z","etag":null,"topics":["api","crud-application","express","joi-validation","mongoose","nodejs","router","typescript"],"latest_commit_sha":null,"homepage":"https://datvt243.github.io/vue-resume-web/","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/datvt243.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":"2024-08-06T11:39:42.000Z","updated_at":"2026-04-04T11:30:56.000Z","dependencies_parsed_at":"2024-08-12T12:04:25.334Z","dependency_job_id":"7ae6e946-49f4-42af-a130-3fddcbedf76e","html_url":"https://github.com/datvt243/nodejs-resume-api-ts","commit_stats":null,"previous_names":["datvt243/nodejs-resume-api-ts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/datvt243/nodejs-resume-api-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datvt243%2Fnodejs-resume-api-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datvt243%2Fnodejs-resume-api-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datvt243%2Fnodejs-resume-api-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datvt243%2Fnodejs-resume-api-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datvt243","download_url":"https://codeload.github.com/datvt243/nodejs-resume-api-ts/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datvt243%2Fnodejs-resume-api-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"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":["api","crud-application","express","joi-validation","mongoose","nodejs","router","typescript"],"created_at":"2024-11-25T10:19:04.597Z","updated_at":"2026-04-07T23:31:08.539Z","avatar_url":"https://github.com/datvt243.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📄 Resume API - Backend (Updated)\n\nMột ứng dụng API backend **hoàn chỉnh** để **quản lý hồ sơ ứng viên (CV/Resume)** với **Redis rate limiting**, **token blacklist**, **PDF export**, **Winston logging**, và **Jest testing**.\n\n**Version**: 1.0.0 | **Author**: DatVT | **License**: ISC\n\n---\n\n## 🎯 Features\n\n- 🔐 **Authentication**: JWT (access/refresh), Bcrypt, Token Blacklist (Redis)\n- 👤 **Profile**: Candidate info + General (skills, languages, career)\n- 📚 **Education** / 💼 **Experience** / 🏆 **Awards** / 📜 **Certificates** / 🚀 **Projects** / 👥 **References**\n- 📄 **PDF Export** (Pug + PDFKit/Puppeteer)\n- 🛡️ **Rate Limiting** (Redis/mem fallback)\n- 📊 **Logging** (Winston daily)\n- 🧪 **Tests** (Jest: auth/middlewares/utils/DB)\n- ✅ **Health**: `/health` endpoint\n\n## 🛠️ Tech Stack\n\n### Core\n\n| Category  | Tech             |\n| --------- | ---------------- |\n| Runtime   | Node.js          |\n| Framework | Express 4.19.2   |\n| Language  | TypeScript 5.5.4 |\n\n### Database \u0026 Cache\n\n| Tech               | Version | Purpose                |\n| ------------------ | ------- | ---------------------- |\n| MongoDB + Mongoose | 8.4.0   | Data                   |\n| Redis              | 4.6.0   | Rate limit / Blacklist |\n\n### Auth \u0026 Security\n\n| Tech               | Version | Purpose    |\n| ------------------ | ------- | ---------- |\n| JWT                | 9.0.2   | Tokens     |\n| Bcrypt             | 5.1.1   | Passwords  |\n| express-rate-limit | 8.3.0   | Protection |\n\n### Utils\n\n| Tech                 | Version        | Purpose    |\n| -------------------- | -------------- | ---------- |\n| Joi                  | 17.13.1        | Validation |\n| PDFKit/Puppeteer/Pug | 0.15/22.13/3.0 | PDF        |\n| Winston              | 3.19.0         | Logging    |\n\n---\n\n## 📁 Project Structure\n\n```\nbackend/\n├── src/\n│   ├── server.ts (health/Redis)\n│   ├── config/     (env/Joi/CORS)\n│   ├── database/   (Mongo)\n│   ├── middlewares/ (rateLimit/logger)\n│   ├── models/     (schemas)\n│   ├── routers/api/v1/ (CRUD routes)\n│   ├── candidate_profile/ (controllers/services per section)\n│   ├── services/   (PDF/Redis)\n│   ├── utils/      (JWT/bcrypt/blacklist)\n│   ├── views/      (Pug)\n│   ├── public/     (assets/pdf)\n│   ├── __tests__/  (Jest)\n│   └── types/\n├── scripts/       (GitHub automation)\n├── TODO.md        (progress)\n├── package.json\n└── README.md ← Updated\n```\n\n---\n\n## 🚀 Quick Start\n\n1. **Install**: `npm install`\n2. **Env**: `npm run env:setup` + edit `.env`:\n\n```\nNODE_ENV=development\nLOCAL_PORT=3001\nMONGO_URI=... or MONGOBD_USER/PASSWORD\nTOKEN_SECRET=... (32+ chars)\nTOKEN_REFRESH=...\nSESSION_SECRET=...\nREDIS_URL=redis://localhost:6379  # Optional\n```\n\n3. **Redis** (rec.): `brew install redis \u0026\u0026 redis-server`\n4. **Dev**: `npm run dev` → http://localhost:3001/health\n5. **Build/Test**: `npm run build` / `npm test`\n\n**Prod**: `npm run start`\n\n---\n\n## 📚 API Endpoints (v1 - JWT required except auth)\n\n### Auth `/api/v1/auth`\n\n| Method | Path        | Desc            |\n| ------ | ----------- | --------------- |\n| POST   | `/register` | Create user     |\n| POST   | `/login`    | Get tokens      |\n| POST   | `/logout`   | Blacklist token |\n| POST   | `/refresh`  | Renew access    |\n\n### Candidate `/api/v1/candidate`\n\n| Method    | Path      | Desc        |\n| --------- | --------- | ----------- |\n| GET       | `/:email` | Get profile |\n| PUT/PATCH | `/`       | Update      |\n\n### CRUD Pattern (all sections)\n\n**Paths**: `/api/v1/{education,experience,award,certificate,project,reference,generalInformation}`\n| Method | Path | Desc |\n|--------|------|------|\n| GET | `/` | List |\n| POST | `/create` | Create |\n| PUT | `/update` | Update |\n| DELETE | `/delete/:id` | Delete |\n\n**Header**: `Authorization: Bearer \u003ctoken\u003e`\n\n---\n\n## 🔐 Auth Flow\n\n1. **Login** → `{token, tokenRefresh}`\n2. **API Calls**: `Authorization: Bearer ${token}`\n3. **Refresh**: POST `/auth/refresh`\n4. **Logout**: Blacklist (Redis/utils/tokenBlacklist.ts)\n5. **Invalid**: Checked via Redis/mem store\n\n---\n\n## 🧪 Scripts \u0026 Testing\n\n**Scripts**:\n\n- `npm run dev` - Hot reload\n- `npm run build` - Compile + copy assets\n- `npm run test` - Jest\n\n**Tests (~20 files)**: auth.service/controller, middlewares (rateLimit/logger/verify), utils (bcrypt/valid), database/mongo\n\n---\n\n---\n\n## 🛡️ Production Notes\n\n- **Rate Limit**: Redis (fallback mem), exempt `/health`\n- **Blacklist**: Redis/utils/tokenBlacklist.ts\n- **Logs**: Winston daily rotation\n- **Static**: public/ (CSS/JS/fonts/img/PDFs)\n- **PDF**: services/createPDF.ts + views/\n\n---\n\n## 🐛 Troubleshooting\n\n| Issue        | Fix                                  |\n| ------------ | ------------------------------------ |\n| Mongo fail   | MONGO*URI or MONGOBD*\\* vars         |\n| Redis fail   | `brew install redis` or mem fallback |\n| JWT invalid  | Token expired/blacklisted            |\n| Rate limited | Wait / check Redis                   |\n| Build fail   | `npm run copy`                       |\n| Logs         | Check `logs/` (Winston)              |\n\n---\n\n## 📞 Support\n\nĐể báo cáo bug hoặc đề xuất tính năng, vui lòng tạo issue trên repository.\n\n---\n\n## 👨‍💻 Author\n\n**Đạt Võ** - [github.com/datvt243](https://github.com/datvt243)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatvt243%2Fnodejs-resume-api-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatvt243%2Fnodejs-resume-api-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatvt243%2Fnodejs-resume-api-ts/lists"}