{"id":17781616,"url":"https://github.com/rayonstudios/rayon_gcp_express_psql_starter","last_synced_at":"2025-09-07T06:37:54.392Z","repository":{"id":258823933,"uuid":"871382484","full_name":"rayonstudios/rayon_gcp_express_psql_starter","owner":"rayonstudios","description":"Starter kit on steroids for modern NodeJS projects","archived":false,"fork":false,"pushed_at":"2025-05-30T11:07:47.000Z","size":4472,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T06:37:53.444Z","etag":null,"topics":["developer-experience","dx","eslint","express","gcp","infisical","morgan","nodejs","postgresql","prettier","rapid-development","scaffold","starter-template","swagger","tsoa","typescript","zod"],"latest_commit_sha":null,"homepage":"https://be.starters.rayonstudios.com/","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/rayonstudios.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":"2024-10-11T21:08:40.000Z","updated_at":"2025-08-25T17:22:30.000Z","dependencies_parsed_at":"2025-05-30T12:29:25.484Z","dependency_job_id":"8f821dfb-3f3c-499e-a761-52b3c833796c","html_url":"https://github.com/rayonstudios/rayon_gcp_express_psql_starter","commit_stats":null,"previous_names":["rayonstudios/rayon_gcp_express_psql_starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/rayonstudios/rayon_gcp_express_psql_starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayonstudios%2Frayon_gcp_express_psql_starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayonstudios%2Frayon_gcp_express_psql_starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayonstudios%2Frayon_gcp_express_psql_starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayonstudios%2Frayon_gcp_express_psql_starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rayonstudios","download_url":"https://codeload.github.com/rayonstudios/rayon_gcp_express_psql_starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayonstudios%2Frayon_gcp_express_psql_starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005337,"owners_count":25205934,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["developer-experience","dx","eslint","express","gcp","infisical","morgan","nodejs","postgresql","prettier","rapid-development","scaffold","starter-template","swagger","tsoa","typescript","zod"],"created_at":"2024-10-27T04:03:44.235Z","updated_at":"2025-09-07T06:37:54.367Z","avatar_url":"https://github.com/rayonstudios.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rayon GCP Express PSQL Starter\n\nRayon GCP Express PSQL Starter is an opinionated starter kit designed to scaffold backend projects quickly with a wide range of pre-configured features, built-in best practices, and \"batteries included.\" It leverages Google Cloud Platform for deployment and Prisma for database management, allowing you to focus on building functionality.\n\n[Live Demo](https://be.starters.rayonstudios.com/)\n\n## Tech Stack\n\n- **TypeScript** (NodeJS)\n- **PostgreSQL** (via Prisma ORM)\n- **Express.js**\n- **Google App Engine**\n- **Google Cloud Storage**\n- **Infisical**\n- **tsoa**\n- **zod**\n- **Morgan**\n- **Brevo**\n\n## Features\n\n- 🔄 **Shared Types for Models \u0026 Request Validation**: Ensure consistent data types across the entire stack by sharing types between models and request validation.\n- 📚 **Automatic Swagger Docs**: Generate comprehensive and up-to-date OpenAPI documentation straight from your codebase with tsoa.\n- 🌐 **OpenAPI Specification**: Auto-generated OpenAPI JSON specification for seamless integration with API development tools and client SDKs.\n- 🔐 **Flexible Authentication**: Secure authentication and authorization using both JWT for user sessions and API keys for service-to-service communication.\n- 📜 **Request Validation with zod \u0026 tsoa**: Validate request data effortlessly using advanced schema validation with zod and TypeScript-based tsoa.\n- 📝 **Data Logging with Morgan**: Log incoming requests and responses for enhanced observability and debugging.\n- 🛡️ **Role-Based Access Control (RBAC)**: Manage user permissions and access levels through a robust role-based access control system.\n- 🧬 **Database Introspection with Prisma**: Seamlessly interact with PostgreSQL using Prisma's intuitive ORM and database introspection.\n- 🔄 **Automatic Schema Migration**: Automatically migrate database schemas using Xata CLI and GitHub Actions on PR merge.\n- 📧 **Pre-configured Email Client**: Easily send emails through Brevo with the built-in, ready-to-use email client.\n- 📂 **File Upload \u0026 Retrieval**: Handle file uploads and retrievals with multer and store them securely in Google Cloud Storage.\n- 🖼️ **Config-based Auto Image Resizing**: Automatically resize uploaded images in the background based on configurable presets and dimensions.\n- 🔄 **Live Code Reloading \u0026 Spec Generation**: Enjoy fast development cycles with live code reloading and on-the-fly API spec updates.\n- 🚀 **CI/CD for GCP App Engine Deployments**: Automated deployment pipelines using GitHub Actions for continuous integration and deployment to GCP.\n- 🔑 **Automatic Environment Variables with Infisical**: Simplify secret management and environment configuration using Infisical for secure variable injection.\n- 🔔 **Multi-channel Notifications**: Send notifications across in-app, push, and email channels with a unified API for user engagement.\n- 📊 **One-liner Pagination for Models**: Easily implement pagination for any database model with a single line of code.\n- 🔍 **One-liner Multi-Column Search**: Add multi-column search functionality to your modules with a single line of code using the `withSearch` higher-order function, mimicking full-text search capabilities.\n- 🛑 **Global Error Handling**: Catch and manage errors gracefully across your entire application with centralized error handling.\n- 🛡️ **hCaptcha Protection**: Secure sensitive public routes with hCaptcha to prevent automated abuse and spam.\n- ✅ **ESLint Integration**: Keep your codebase clean and consistent with linting rules enforced by ESLint.\n- 🌍 **Development \u0026 Production Environment Separation**: Seamlessly switch between dev and prod configurations with environment-specific settings.\n- 📁 **Feature-based Folder Structure**: Organize your project with a clear, scalable folder structure separating core logic by feature.\n\n## Deployment\n\nDeployment is managed through GitHub Actions, with automatic deployments to Google App Engine:\n- **main branch**: Deploys to production.\n- **dev branch**: Deploys to the development environment.\n\n## Installation and Setup\n\n1. Clone the repository:\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd \u003crepository-folder\u003e\n    ```\n2. Create a .env.infisical file with the following variables:\n    ```bash\n    INFISICAL_CLIENT_ID=\u003cyour-infisical-client-id\u003e\n    INFISICAL_CLIENT_SECRET=\u003cyour-infisical-client-secret\u003e\n    INFISICAL_PROJECT_ID=\u003cyour-infisical-workspace-slug\u003e\n    ```\n2. Install dependencies:\n    ```bash\n    npm i\n    ```\n3. Start the development server:\n    ```bash\n    npm run dev\n    ```\n\n## Best Practices\n- Use **kebab-case** for file and folder names.\n- Reusable, feature-independent code should be placed in the `lib` folder.\n- Feature-dependent code goes under the `modules` folder, while middlewares are under the `middlewares` folder.\n- **Snake case** should be used for database field names.\n- Foreign key names should strictly be in the format `\u003cname\u003e_id` (ex: user_id) to allow schema transform scripts to work correctly.\n- Use `statusConst` to define HTTP status codes and messages, rather than hardcoding them.\n- Basic request validation can be handled by tsoa through TypeScript, but use zod for advanced validation (e.g., email format, min/max constraints).\n- Exported module types that are mean to be used as input/output types of a controller method, should be wrapped inside the `Expand` utility type as a workaround for tsoa's inability to handle complex nested types.\n- Files in **scripts folder should not have any external dependencies**, as they are meant to run prior to dependencies installation.\n\n## Roadmap\n- [ ] Add unit tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayonstudios%2Frayon_gcp_express_psql_starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frayonstudios%2Frayon_gcp_express_psql_starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayonstudios%2Frayon_gcp_express_psql_starter/lists"}