{"id":25844099,"url":"https://github.com/yumeangelica/fullstack-phonebook-application","last_synced_at":"2026-04-01T17:29:17.687Z","repository":{"id":196307695,"uuid":"695711517","full_name":"yumeangelica/fullstack-phonebook-application","owner":"yumeangelica","description":"Phonebook app with real-time validation and international phone number support. Built with React, Node.js, Express, and MongoDB.","archived":false,"fork":false,"pushed_at":"2026-03-11T01:29:59.000Z","size":508,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-28T00:38:48.853Z","etag":null,"topics":["cicd","express","fullstack","javascript","jest","mongodb","mongoose","nodejs","pipeline","reactjs","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/yumeangelica.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":"2023-09-24T01:23:10.000Z","updated_at":"2026-03-21T21:50:40.000Z","dependencies_parsed_at":"2023-10-16T14:12:08.544Z","dependency_job_id":"1ea99335-50a3-4a50-90db-abf69e107648","html_url":"https://github.com/yumeangelica/fullstack-phonebook-application","commit_stats":null,"previous_names":["angelicaroselie/fullstack-phonebook-application","yumeangelica/fullstack-phonebook-application"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yumeangelica/fullstack-phonebook-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yumeangelica%2Ffullstack-phonebook-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yumeangelica%2Ffullstack-phonebook-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yumeangelica%2Ffullstack-phonebook-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yumeangelica%2Ffullstack-phonebook-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yumeangelica","download_url":"https://codeload.github.com/yumeangelica/fullstack-phonebook-application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yumeangelica%2Ffullstack-phonebook-application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["cicd","express","fullstack","javascript","jest","mongodb","mongoose","nodejs","pipeline","reactjs","webpack"],"created_at":"2025-03-01T07:19:57.856Z","updated_at":"2026-04-01T17:29:17.657Z","avatar_url":"https://github.com/yumeangelica.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fullstack Phonebook Application\n\nA modern phonebook application with user authentication, real-time validation, international phone number support, and comprehensive testing. Built with React, Node.js, Express, and MongoDB.\n\nOriginally created for the Full Stack Open course in 2023, significantly modernized and enhanced in 2026 with improved architecture, authentication, validation, testing, and production-ready features.\n\n## Features\n\n- **User authentication** — register, login, logout, and delete account\n- **Per-user phonebook** — each user has their own private contacts\n- Add, edit, delete, and search contacts\n- Real-time form validation with visual feedback\n- International phone number validation with country codes\n- Finnish phone number normalization (removes leading zero)\n- Responsive design for desktop and mobile\n- Search and filter functionality\n- Pagination for large contact lists\n- Comprehensive error handling\n\n## Tech Stack\n\n**Frontend:** React 19, Webpack 5, libphonenumber-js\n**Backend:** Node.js 22, Express 5, MongoDB, Mongoose 9\n**Auth:** jose (JWT HS256), bcrypt\n**Testing:** Node.js built-in test runner (`node:test`), supertest\n**Development:** Concurrently, ESLint 9 (flat config)\n\n## Quick Start\n\n### Prerequisites\n\n- Node.js \u003e= 20.0.0\n- npm\n- MongoDB (local or MongoDB Atlas)\n\n### Installation\n\n```bash\ngit clone \u003crepository-url\u003e\ncd fullstack-phonebook-application\nnpm install\n```\n\n### Environment Setup\n\nCreate `.env` file:\n\n```\nMONGODB_URI=your-mongodb-uri\nTEST_MONGODB_URI=your-test-mongodb-uri\nJWT_SECRET=your-secret-key\nPORT=5001\n```\n\n### Development\n\n```bash\nnpm run dev\n```\n\nFrontend: http://localhost:3000\nBackend: http://localhost:5001\n\n### Production\n\n```bash\nnpm run build\nnpm start\n```\n\n## Scripts\n\n- `npm run dev` - Start development servers (backend + frontend)\n- `npm run build` - Build for production\n- `npm start` - Start production server\n- `npm test` - Run all tests\n- `npm run test:frontend` - Run React component tests\n- `npm run test:backend` - Run API and model tests\n- `npm run test:watch` - Run backend tests in watch mode\n- `npm run lint` - Run ESLint\n\n## API Endpoints\n\n### Authentication (public)\n\n```\nPOST   /api/auth/register - Register a new user\nPOST   /api/auth/login    - Login and receive JWT token\n```\n\n### Authentication (requires token)\n\n```\nGET    /api/auth/me        - Get current user info\nDELETE /api/auth/me        - Delete account and all contacts\n```\n\n### Contacts (requires token)\n\n```\nGET    /api/persons        - Get all contacts (with search/pagination)\nPOST   /api/persons        - Create new contact\nGET    /api/persons/:id    - Get specific contact\nPUT    /api/persons/:id    - Update contact\nDELETE /api/persons/:id    - Delete contact\nGET    /api/stats          - Get user's statistics\n```\n\n### Health (public)\n\n```\nGET    /health             - Health check\nGET    /ready              - Readiness probe\nGET    /live               - Liveness probe\n```\n\n## Validation\n\n**Username:** 3-30 characters, lowercase letters, numbers, hyphens, underscores\n**Password:** Minimum 8 characters\n**Names:** 3-50 characters, letters/spaces/hyphens/apostrophes only, Unicode support\n**Phone:** International format with country codes, real-world validation using libphonenumber-js\n\n## Project Structure\n\n```\n├── client/              # React frontend\n│   ├── components/      # React components with tests\n│   ├── css/             # Styling\n│   ├── hooks/           # Custom hooks (useAuth, usePersons, useNotification)\n│   ├── services/        # API services (native fetch)\n│   ├── utils/           # Validation utilities\n│   └── test-setup.js    # jsdom setup for frontend tests\n├── server/              # Express backend\n│   ├── controllers/     # Route handlers (auth, api, health, index)\n│   ├── middleware/      # Auth, error handling, logging, security\n│   ├── models/          # Mongoose models (User, Person)\n│   ├── tests/           # Backend tests (supertest)\n│   └── utils/           # Config, database, and auth utilities\n├── eslint.config.js     # ESLint flat config\n├── index.html           # HTML template\n└── index.js             # Server entry point\n```\n\n## Credits\n\nCreated by yumeangelica (yumeangelica.github.io)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyumeangelica%2Ffullstack-phonebook-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyumeangelica%2Ffullstack-phonebook-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyumeangelica%2Ffullstack-phonebook-application/lists"}