{"id":22004021,"url":"https://github.com/khanhduzz/nextjs-ver2","last_synced_at":"2026-04-16T04:32:28.758Z","repository":{"id":262556518,"uuid":"887629380","full_name":"khanhduzz/nextjs-ver2","owner":"khanhduzz","description":"Just a mini NextJs for learning","archived":false,"fork":false,"pushed_at":"2025-04-16T15:36:15.000Z","size":8473,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T22:58:12.607Z","etag":null,"topics":["jquery","nextjs","session-cookie","typescript"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/khanhduzz.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-11-13T02:19:20.000Z","updated_at":"2025-04-16T15:36:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"84402a84-9039-4131-ade6-dc126ae3a7ad","html_url":"https://github.com/khanhduzz/nextjs-ver2","commit_stats":null,"previous_names":["khanhduzz/nextjs-ver2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khanhduzz/nextjs-ver2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanhduzz%2Fnextjs-ver2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanhduzz%2Fnextjs-ver2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanhduzz%2Fnextjs-ver2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanhduzz%2Fnextjs-ver2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khanhduzz","download_url":"https://codeload.github.com/khanhduzz/nextjs-ver2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanhduzz%2Fnextjs-ver2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31871579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["jquery","nextjs","session-cookie","typescript"],"created_at":"2024-11-30T00:12:03.779Z","updated_at":"2026-04-16T04:32:28.723Z","avatar_url":"https://github.com/khanhduzz.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# NextJs mini... 🍁\nA mini website to learn how to create a website with NextJs \n\n\u003cimg src=\"https://github.com/user-attachments/assets/e2ea082b-ffa3-493f-9cda-c8432ca19659\" alt=\"Description of Image\" width=\"100\" /\u003e\n\n\n\n## Technology:\n- NextJs\n- Session cookie\n- JQuery\n## Structure\n- Using `Page Router`\n- Authenticate with `middleware.ts`\n- The structure:\n```\n.\n├── commons/\n│   ├── components/\n│   └── images/\n├── modules/\n│   ├── articles/\n│   ├── authentication/\n│   ├── contact/\n│   └── home/\n├── pages/\n│   ├── about/\n│   ├── admin/\n│   ├── api/\n│   ├── articles/\n│   ├── blog/\n│   ├── category/\n│   ├── contact/\n│   ├── login/\n│   ├── style/\n│   ├── _app.tsx\n│   ├── _document.tsx\n│   └── index.tsx\n├── publics/\n├── styles/\n└── middleware.ts\n```\n\n## Admin account\n- Default admin account:\n```\n  username: admin\n  password: password\n```\n## Functionality\n#### General:\n- Pagination, Filter with category, type of articles\n#### Anonymous user:\n- View all articles in homepage, filter by category, filter by type (video, audio,...), send contact to the admin in the contact page\n- Search articles based on the articles name.\n#### Admin:\n- Login with admin account and able to see the user's contact in `Contacts` page.\n- Search articles based on the articles name.\n\n## Workflow:\n#### Articles load and pagination:\n_This website does not use database, the hardcode data is using instead._\n- Article use api in `pages/api/articles/` (for both single article or articles with pagination) to fetch data in `/modules/articles/Data.tsx`.\n#### Login:\n- User go to `login page` -\u003e login with default account\n- `Login page` -\u003e request to server -\u003e `POST api/auth/login/` -\u003e confirm infomation -\u003e save to `Session cookie` with expire time is 3600s.\n- Every time load page, client take user information in `Session cookie` -\u003e `GET api/auth/` -\u003e server to validate user information.\n#### Logout:\n- User click logout -\u003e `POST api/auth/logout/` -\u003e Remove information in `Session cookie`, redirect to homepage.\n#### Contacts:\n- User send contact to server: `POST api/contact-form` -\u003e save data to `Session cookie` with time out is 3600.\n- Admin get contacts: `GET api/contact-form` -\u003e get all contacts with pagination.\n## Page url:\n- Homepage: `localhost:3000`\n- Single article: `localhost:3000/articles/[id]`\n- Category: `localhost:3000/category/`\n- Specific category: `localhost:3000/category/[slug]`\n- Blog: `localhost:3000/blog/`\n- Contact for user: `localhost:3000/contact/`\n- View user's contacts: `locahost:3000/admin/contacts/`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanhduzz%2Fnextjs-ver2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhanhduzz%2Fnextjs-ver2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanhduzz%2Fnextjs-ver2/lists"}