{"id":42165088,"url":"https://github.com/pedramcode/feature-service","last_synced_at":"2026-01-26T21:00:40.414Z","repository":{"id":309367515,"uuid":"1036016875","full_name":"pedramcode/feature-service","owner":"pedramcode","description":"Feature service with dependency support","archived":false,"fork":false,"pushed_at":"2025-08-11T13:02:31.000Z","size":8110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T14:32:26.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pedramcode.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":"2025-08-11T12:41:43.000Z","updated_at":"2025-08-11T13:02:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"e83bd13c-cd2f-4b39-8d78-3ee7bb2157dc","html_url":"https://github.com/pedramcode/feature-service","commit_stats":null,"previous_names":["pedramcode/feature-service"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pedramcode/feature-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedramcode%2Ffeature-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedramcode%2Ffeature-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedramcode%2Ffeature-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedramcode%2Ffeature-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedramcode","download_url":"https://codeload.github.com/pedramcode/feature-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedramcode%2Ffeature-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28788061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"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":[],"created_at":"2026-01-26T21:00:22.131Z","updated_at":"2026-01-26T21:00:40.373Z","avatar_url":"https://github.com/pedramcode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feature Toggle Service\n\nA scalable feature toggle management service built with Node.js, Express, PostgreSQL, Redis, and Prisma ORM. This service allows you to create, activate, deactivate, and manage feature flags with dependency support.\n\n## Features\n\n- RESTful API for feature toggle management\n- Dependency-aware activation and deactivation\n- PostgreSQL for persistent storage\n- Redis for caching and rate limiting\n- Robust error handling and logging\n- Dockerized for easy deployment\n\n\n## Getting Started\n\n### Prerequisites\n\n- [Docker](https://www.docker.com/get-started)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n### Environment Variables\n\nCreate a `.env` file in the project root with the following variables:\n\n```env\nHTTP_PORT=8080\nHTTP_HOST=0.0.0.0\nLOG_PATH=/var/log\nRUNTIME=dev | prod\nREDIS_URL=redis://user-service-redis:6379/2\nDATABASE_URL=postgresql://\u003cPOSTGRES_USER\u003e:\u003cPOSTGRES_PASSWORD\u003e@postgres:5432/feature\n```\n\n## Important:\nBefore running docker compose up, you must set the following environment variables in your host OS:\n\n```env\nPOSTGRES_USER\nPOSTGRES_PASSWORD\n```\nThese are required for the PostgreSQL container to start correctly.\n\nExample (Linux/macOS):\n\n```bash\nexport POSTGRES_USER=yourusername\nexport POSTGRES_PASSWORD=yourpassword\n```\n\n# Running the Service\nBuild and start all services using Docker Compose:\n\n```docker\ndocker compose up --build\n```\n\nThis will start:\n\nThe feature toggle service (Node.js/Express)\nPostgreSQL database\nRedis cache\n\n## Test\n\nFor running tests run\n\n```bash\nnpm run test\n```\n\n# API Endpoints\n\n## Health Check\n* GET /ping\n\n    Returns PONG if the service is running.\n\n## Feature Management\n\n* POST /api/feature\n\n    Create a new feature toggle.\n\n* GET /api/feature\n\n    List all features.\n\n* PUT /api/feature/on/:key\n\n    Activate a feature (with dependency checks).\n\n* PUT /api/feature/off/:key\n\n    Deactivate a feature (recursively deactivates dependents).\n\n\n# Database Migrations\nMigrations are managed by Prisma.\nOn container startup, migrations are automatically applied via `npm run db:deploy`.\n\n# Logging\nLogs are written to the console and to the file specified by `LOG_PATH`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedramcode%2Ffeature-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedramcode%2Ffeature-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedramcode%2Ffeature-service/lists"}