{"id":24299128,"url":"https://github.com/rafaumeu/pocket-api","last_synced_at":"2025-08-01T18:10:20.116Z","repository":{"id":272678547,"uuid":"917407761","full_name":"rafaumeu/pocket-api","owner":"rafaumeu","description":"🚀 InOrbit is a high-performance backend built with TypeScript ⚡, Fastify 🚀, and PostgreSQL 🐘. It features Drizzle ORM 💾, JWT authentication 🔐, and Docker 🐳 integration, ensuring seamless deployment and scalability. The platform offers efficient data management 📊, authentication 🛡️, and goal tracking 🎯 for an enhanced user experience!","archived":false,"fork":false,"pushed_at":"2025-01-23T00:33:45.000Z","size":273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T01:23:26.522Z","etag":null,"topics":["api-docs","backend","biomejs","ci-cd","cuid","database-migrations","docker","drizzle","fastify","gamification","high-performance","jwt-authentication","nodejs","orm","postgresql","rest-api","swagger","test-coverage","typescript","zod"],"latest_commit_sha":null,"homepage":"","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/rafaumeu.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":"2025-01-15T23:26:11.000Z","updated_at":"2025-01-21T19:40:33.000Z","dependencies_parsed_at":"2025-01-19T00:46:05.033Z","dependency_job_id":null,"html_url":"https://github.com/rafaumeu/pocket-api","commit_stats":null,"previous_names":["rafaumeu/pocket-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaumeu%2Fpocket-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaumeu%2Fpocket-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaumeu%2Fpocket-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaumeu%2Fpocket-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafaumeu","download_url":"https://codeload.github.com/rafaumeu/pocket-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242189106,"owners_count":20086515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-docs","backend","biomejs","ci-cd","cuid","database-migrations","docker","drizzle","fastify","gamification","high-performance","jwt-authentication","nodejs","orm","postgresql","rest-api","swagger","test-coverage","typescript","zod"],"created_at":"2025-01-16T21:18:47.675Z","updated_at":"2025-03-06T10:24:01.781Z","avatar_url":"https://github.com/rafaumeu.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/logo.svg\" alt=\"InOrbit Logo\" width=\"150\" height=\"150\" /\u003e\n\n# InOrbit\n\nA modern TypeScript backend application powered by Fastify and PostgreSQL.\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)\n[![Fastify](https://img.shields.io/badge/Fastify-Latest-green.svg)](https://www.fastify.io/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-Latest-blue.svg)](https://www.postgresql.org/)\n[![Drizzle ORM](https://img.shields.io/badge/Drizzle_ORM-Latest-orange.svg)](https://orm.drizzle.team/)\n\n---\n\n## 📖 Table of Contents\n\n| [⚡ Tech Stack](#⚡-tech-stack) | [🛠 Development Tools](#🛠-development-tools) | [🚀 Features](#🚀-features) |\n|--------------------------------|-----------------------------------------------|----------------------------|\n| [📦 Prerequisites](#📦-prerequisites) | [🛠️ Setup](#🛠️-setup) | [🎯 API Endpoints](#🎯-api-endpoints) |\n| [🏗️ Project Structure](#🏗️-project-structure) | [🧪 Running Tests](#🧪-running-tests) | [📚 API Documentation](#📚-api-documentation) |\n| [🛡️ License](#🛡️-license) | [🤝 Contributing](#🤝-contributing) | [🔧 Environment Variables](#🔧-environment-variables) |\n\n---\n\n### ⚡ Tech Stack\n\n![Node.js](https://img.shields.io/badge/Node.js-339933?style=for-the-badge\u0026logo=nodedotjs\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![PostgreSQL](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white)\n![Fastify](https://img.shields.io/badge/Fastify-202020?style=for-the-badge\u0026logo=fastify\u0026logoColor=white)\n\n---\n\n### 🛠 Development Tools\n\n![Drizzle](https://img.shields.io/badge/Drizzle_ORM-4053D6?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2Z)\n![Zod](https://img.shields.io/badge/Zod-3E67B1?style=for-the-badge\u0026logo=zod\u0026logoColor=white)\n![Biome](https://img.shields.io/badge/Biome-60A5FA?style=for-the-badge\u0026logo=biome\u0026logoColor=white)\n![Day.js](https://img.shields.io/badge/Day.js-F6C915?style=for-the-badge\u0026logo=javascript\u0026logoColor=black)\n![CUID2](https://img.shields.io/badge/CUID2-4053D6?style=for-the-badge\u0026logo=uniqueid\u0026logoColor=white)\n\n---\n\u003c/div\u003e\n\n## 🚀 Features\n\n- **Modern TypeScript**: Built with the latest TypeScript features for type-safe development\n- **High Performance**: Powered by Fastify, one of the fastest web frameworks for Node.js\n- **Database Integration**: PostgreSQL with Drizzle ORM for efficient data management\n- **Docker Ready**: Containerized setup for consistent development and deployment\n- **Developer Experience**: Configured with Biome for linting and formatting\n- **ID Generation**: Utilizes CUID2 for unique identifier generation\n- **Date Handling**: Efficient date manipulation with Day.js\n- **Database Seeding**: Built-in seeding functionality for development and testing\n- **Schema Validation**: Request/Response validation with Zod and JSON Schema generation\n- **Goals Management**: Complete system for creating and tracking goals with completion status\n- **CORS Support**: Enabled with `@fastify/cors` for cross-origin requests\n- **Pending Goals and Summaries**: Retrieve and summarize goals for the current week\n\n---\n\n## 📦 Prerequisites\n\n- Node.js (Latest LTS version)\n- Docker and Docker Compose\n- Yarn package manager\n\n---\n\n## 🛠️ Setup\n\n\u003e 🚨 **Important:** Ensure Docker is running before proceeding.\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/rafaumeu/pocket-api.git\ncd pocket-api\n```\n\n2. Install dependencies:\n\n```bash\nyarn install\n```\n\n3. Start the PostgreSQL database using Docker:\n\n```bash\ndocker-compose up -d\n```\n\n4. Set up your environment variables:\n\n```bash\ncp .env.example .env\n```\n\n5. Run database migrations:\n\n```bash\nyarn migration:run\n```\n\n6. Seed the database (optional):\n\n```bash\nyarn seed\n```\n\n7. Start the development server:\n\n```bash\nyarn dev\n```\n\n---\n\n## 🎯 API Endpoints\n\n### Goals\n\n- `POST /goals` - Create a new goal\n- `GET /pending-goals` - Retrieve pending goals for the current week\n- `POST /completions` - Mark a goal as completed\n- `GET /week-summary` - Get a summary of the current week\n\n---\n\n## 🏗️ Project Structure\n\n```\ninorbit/\n├── assets/         # Project-related assets\n├── src/\n│   ├── db/        # Database configuration and schemas\n│   │   ├── index.ts  # Database initialization\n│   │   ├── schema.ts # Database schema definitions\n│   │   └── seed.ts   # Database seeding functionality\n│   ├── functions/ # Business logic\n│   │   ├── create-goal.ts\n│   │   ├── get-week-pending-goals.ts\n│   │   ├── create-goal-completion.ts\n│   │   └── get-week-summary.ts\n│   ├── http/      # HTTP server and route handlers\n│   │   ├── routes/ # Separate route handlers\n│   └── env.ts     # Environment variable configuration\n├── .migrations/   # Database migration files\n├── drizzle.config.ts # Drizzle ORM configuration\n├── biome.json    # Biome linting and formatting config\n└── docker-compose.yml\n```\n\n---\n\n## 🧪 Running Tests\n\n```bash\nyarn test\n```\n\n---\n\n## 📚 API Documentation\n\nAPI documentation is available at `http://localhost:3000/docs` when running the development server. The documentation includes request/response schemas generated from Zod definitions.\n\n---\n\n## 🛡️ License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🤝 Contributing\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat: add some amazing feature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## 🔧 Environment Variables\n\n```env\nDATABASE_URL=postgresql://user:password@localhost:5432/inorbit\nPORT=3000\n```\n\n---\n\n\u003cdiv align=\"center\"\u003e\nMade with ❤️ by Rafael Dias Zendron\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/rafaumeu.png\" width=\"100\" height=\"100\" style=\"border-radius: 50%;\"\u003e\n\n### Built with 💜 by Rafael Zendron\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/rafael-dias-zendron-528290132/)\n[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/rafaumeu)\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaumeu%2Fpocket-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaumeu%2Fpocket-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaumeu%2Fpocket-api/lists"}