{"id":27287356,"url":"https://github.com/isaacdarcilla/postcode-metro-check","last_synced_at":"2026-01-22T02:08:11.225Z","repository":{"id":284753227,"uuid":"955941292","full_name":"isaacdarcilla/postcode-metro-check","owner":"isaacdarcilla","description":"Australian Postcode Metro/Non-Metro Classifier ","archived":false,"fork":false,"pushed_at":"2025-03-28T02:31:54.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T20:19:33.678Z","etag":null,"topics":["ai","automation","deepseek","edge-functions","netlify"],"latest_commit_sha":null,"homepage":"https://postcode-metro-check.netlify.app/","language":"HTML","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/isaacdarcilla.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}},"created_at":"2025-03-27T12:53:15.000Z","updated_at":"2025-03-28T02:31:57.000Z","dependencies_parsed_at":"2025-04-11T20:19:39.107Z","dependency_job_id":"65e0afb6-7936-45e7-827b-38629371b1cd","html_url":"https://github.com/isaacdarcilla/postcode-metro-check","commit_stats":null,"previous_names":["isaacdarcilla/postcode-metro-check"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isaacdarcilla/postcode-metro-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacdarcilla%2Fpostcode-metro-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacdarcilla%2Fpostcode-metro-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacdarcilla%2Fpostcode-metro-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacdarcilla%2Fpostcode-metro-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacdarcilla","download_url":"https://codeload.github.com/isaacdarcilla/postcode-metro-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacdarcilla%2Fpostcode-metro-check/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28650810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["ai","automation","deepseek","edge-functions","netlify"],"created_at":"2025-04-11T20:19:32.323Z","updated_at":"2026-01-22T02:08:11.194Z","avatar_url":"https://github.com/isaacdarcilla.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Australian Postcode Metro/Non-Metro Classifier\n\n## Overview\n\nThis Netlify Edge Function provides a simple API to classify Australian postcodes as either 'metro' or 'non-metro' using AI-powered classification.\n\n## Features\n\n- Validate 4-digit Australian postcodes\n- Classify postcodes using an AI model\n- Serverless edge function deployment\n- CORS support\n- Comprehensive error handling and logging\n\n## Prerequisites\n\n- Netlify account\n- Netlify CLI\n- Deno runtime\n- OpenRouter API key (for DeepSeek model)\n\n## Setup\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/isaacdarcilla/postcode-metro-check.git\ncd postcode-metro-check\n```\n\n### 2. Environment Configuration\n\nCreate a `.env.local` file in the project root:\n\n```\nDEEPSEEK_API_KEY=your_openrouter_api_key_here\n```\n\nPlease refer to this [documentation](https://openrouter.ai/deepseek/deepseek-chat-v3-0324:free/api).\n\n### 3. Run Locally\n\n```bash\nnpm install\nnetlify dev\n```\n\n### 4. Deploy to Netlify\n\n```bash\nnetlify deploy --prod\n```\n\n### Endpoint\n\n```\nGET /api/postcodes/{postcode}\n```\n\n### Example Request\n\n```bash\ncurl http://localhost:8888/api/postcodes/3000\ncurl https://your-site.netlify.app/api/postcodes/3000\n```\n\n### Response\n\n```json\n{\n  \"result\": \"metro\"\n}\n```\n\n### Possible Responses\n\n- `{\"result\": \"metro\"}`: Postcode is in a metropolitan area\n- `{\"result\": \"non-metro\"}`: Postcode is in a non-metropolitan area\n- `{\"result\": \"unknown\"}`: Unable to classify\n- `{\"error\": \"invalid\"}`: Invalid postcode format\n\n## Error Handling\n\n- 400 Bad Request: Invalid postcode format\n- 500 Internal Server Error: API or processing failures\n\n## Logging\n\nThe function includes comprehensive logging capturing:\n- Request details\n- Postcode validation\n- AI model interactions\n- Error scenarios\n\nLogs are output to the Netlify function logs for debugging.\n\n## Security\n\n- CORS enabled for all origins\n- API key securely stored in environment variables\n- Input validation for postcodes\n\n## Technologies\n\n- Deno\n- Netlify Edge Functions\n- OpenRouter AI\n- DeepSeek Chat Model\n\n## Limitations\n\n- Relies on AI model accuracy\n- Limited to Australian postcodes\n- Requires active OpenRouter API key\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a pull request\n\n## Support\n\nFor issues or questions, please [open an issue](https://github.com/isaacdarcilla/postcode-metro-check/issues)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacdarcilla%2Fpostcode-metro-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacdarcilla%2Fpostcode-metro-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacdarcilla%2Fpostcode-metro-check/lists"}