├── templates ├── .gitkeep ├── mean │ └── server │ │ ├── .gitignore │ │ ├── models │ │ └── .gitkeep │ │ ├── routes │ │ └── .gitkeep │ │ ├── controllers │ │ └── .gitkeep │ │ ├── .env.example │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── server.js ├── mern │ ├── server │ │ ├── .gitignore │ │ ├── models │ │ │ └── .gitkeep │ │ ├── routes │ │ │ └── .gitkeep │ │ ├── controllers │ │ │ └── .gitkeep │ │ ├── .env.example │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── server.js │ └── Ts-Backend │ │ ├── .gitignore │ │ ├── src │ │ ├── api │ │ │ └── user │ │ │ │ └── v1 │ │ │ │ ├── user.type.ts │ │ │ │ ├── user.constant.ts │ │ │ │ ├── user.validator.ts │ │ │ │ ├── user.service.ts │ │ │ │ ├── user.routes.ts │ │ │ │ ├── user.utils.ts │ │ │ │ └── user.controller.ts │ │ ├── __test__ │ │ │ └── index.test.ts │ │ ├── constant │ │ │ └── env.constant.ts │ │ ├── config │ │ │ ├── db.config.ts │ │ │ └── socket.config.ts │ │ ├── app.ts │ │ ├── validator │ │ │ └── env.validator.ts │ │ └── utils │ │ │ └── SendResponse.utils.ts │ │ ├── .prettierrc │ │ ├── .husky │ │ └── pre-commit │ │ ├── .prettierignore │ │ ├── server.ts │ │ ├── eslint.config.mjs │ │ ├── tsconfig.json │ │ ├── package.json │ │ ├── .env.example │ │ └── readme.md ├── mevn │ └── server │ │ ├── .gitignore │ │ ├── models │ │ └── .gitkeep │ │ ├── routes │ │ └── .gitkeep │ │ ├── controllers │ │ └── .gitkeep │ │ ├── .env.example │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── server.js ├── hono │ ├── javascript │ │ ├── server │ │ │ ├── .gitkeep │ │ │ ├── .env.example │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── .dockerignore │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ ├── Dockerfile │ │ │ ├── README.md │ │ │ ├── prisma │ │ │ │ └── schema.prisma │ │ │ ├── .gitignore │ │ │ └── wrangler.jsonc │ │ └── client │ │ │ ├── vite.config.js │ │ │ ├── .dockerignore │ │ │ ├── src │ │ │ ├── main.jsx │ │ │ ├── App.jsx │ │ │ ├── App.css │ │ │ ├── index.css │ │ │ └── assets │ │ │ │ └── react.svg │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── Dockerfile │ │ │ ├── package.json │ │ │ ├── eslint.config.js │ │ │ ├── README.md │ │ │ └── public │ │ │ └── vite.svg │ ├── typescript │ │ ├── server │ │ │ ├── .gitkeep │ │ │ ├── .env.example │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ ├── .dockerignore │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ ├── Dockerfile │ │ │ ├── README.md │ │ │ ├── prisma │ │ │ │ └── schema.prisma │ │ │ ├── .gitignore │ │ │ └── wrangler.jsonc │ │ └── client │ │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── main.tsx │ │ │ ├── App.tsx │ │ │ ├── App.css │ │ │ ├── index.css │ │ │ └── assets │ │ │ │ └── react.svg │ │ │ ├── tsconfig.json │ │ │ ├── vite.config.ts │ │ │ ├── .dockerignore │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── Dockerfile │ │ │ ├── eslint.config.js │ │ │ ├── tsconfig.node.json │ │ │ ├── package.json │ │ │ ├── tsconfig.app.json │ │ │ ├── public │ │ │ └── vite.svg │ │ │ └── README.md │ └── docker-compose.yml ├── mean+tailwind+auth │ └── server │ │ ├── .gitignore │ │ ├── .env.example │ │ ├── .dockerignore │ │ ├── models │ │ └── User.js │ │ ├── routes │ │ └── authRoutes.js │ │ ├── Dockerfile │ │ ├── server.js │ │ └── controllers │ │ └── authController.js ├── mern+tailwind+auth │ └── server │ │ ├── .gitignore │ │ ├── .env.example │ │ ├── .dockerignore │ │ ├── models │ │ └── User.js │ │ ├── routes │ │ └── authRoutes.js │ │ ├── Dockerfile │ │ ├── server.js │ │ └── controllers │ │ └── authController.js ├── mevn+tailwind+auth │ ├── javascript │ │ ├── .gitkeep │ │ ├── server │ │ │ ├── .gitignore │ │ │ ├── .env.example │ │ │ ├── .dockerignore │ │ │ ├── models │ │ │ │ └── User.js │ │ │ ├── routes │ │ │ │ └── authRoutes.js │ │ │ ├── Dockerfile │ │ │ ├── package.json │ │ │ ├── server.js │ │ │ └── controllers │ │ │ │ └── authController.js │ │ └── client │ │ │ ├── .vscode │ │ │ └── extensions.json │ │ │ ├── src │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── vue.svg │ │ │ ├── App.vue │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ └── style.css │ │ │ ├── .dockerignore │ │ │ ├── vite.config.js │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── Dockerfile │ │ │ └── public │ │ │ └── vite.svg │ ├── server │ │ ├── .gitignore │ │ ├── .env.example │ │ ├── models │ │ │ └── User.js │ │ ├── routes │ │ │ └── authRoutes.js │ │ ├── server.js │ │ └── controllers │ │ │ └── authController.js │ ├── typescript │ │ ├── .gitkeep │ │ ├── server │ │ │ ├── .gitignore │ │ │ ├── .env.example │ │ │ ├── .dockerignore │ │ │ ├── models │ │ │ │ └── User.js │ │ │ ├── routes │ │ │ │ └── authRoutes.js │ │ │ ├── Dockerfile │ │ │ ├── package.json │ │ │ ├── server.js │ │ │ └── controllers │ │ │ │ └── authController.js │ │ └── client │ │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── vue.svg │ │ │ ├── App.vue │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ └── style.css │ │ │ ├── .vscode │ │ │ └── extensions.json │ │ │ ├── tsconfig.json │ │ │ ├── .dockerignore │ │ │ ├── vite.config.ts │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── README.md │ │ │ ├── tsconfig.app.json │ │ │ ├── package.json │ │ │ ├── Dockerfile │ │ │ ├── tsconfig.node.json │ │ │ └── public │ │ │ └── vite.svg │ └── docker-compose.yml ├── react+tailwind+firebase │ ├── typescript │ │ └── client │ │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── main.tsx │ │ │ ├── index.css │ │ │ ├── firebase │ │ │ │ └── config.ts │ │ │ └── App.tsx │ │ │ ├── firestore.indexes.json │ │ │ ├── tsconfig.json │ │ │ ├── .dockerignore │ │ │ ├── vite.config.ts │ │ │ ├── firestore.rules │ │ │ ├── .env.example │ │ │ ├── firebase.json │ │ │ ├── index.html │ │ │ ├── tsconfig.node.json │ │ │ ├── Dockerfile │ │ │ ├── tsconfig.app.json │ │ │ ├── package.json │ │ │ ├── eslint.config.js │ │ │ └── README.md │ └── javascript │ │ └── client │ │ ├── firestore.indexes.json │ │ ├── .dockerignore │ │ ├── vite.config.js │ │ ├── src │ │ ├── main.jsx │ │ ├── index.css │ │ ├── firebase │ │ │ └── config.js │ │ └── App.jsx │ │ ├── firestore.rules │ │ ├── .env.example │ │ ├── firebase.json │ │ ├── index.html │ │ ├── Dockerfile │ │ ├── package.json │ │ ├── eslint.config.js │ │ └── README.md ├── nextjs │ └── app │ │ └── api │ │ └── router │ │ └── route.js └── docker-compose.yml ├── tests └── .gitkeep ├── bin └── celtrix.js ├── .gitignore ├── commands ├── scaffold.js └── login.js ├── utils ├── logger.js └── project.js ├── .github ├── ISSUE_TEMPLATE │ ├── other.md │ ├── feature_request.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── api-validation.yml │ ├── duplicate-issue.yml │ └── database-operations.yml ├── LICENSE ├── package.json ├── FAQ.md ├── CODE_OF_CONDUCT.md ├── scripts ├── debug-pinecone.js ├── cleanup-specific-issue.js └── validate-apis.js ├── README.md ├── WORKFLOWS.md └── CONTRIBUTING.md /templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mean/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mean/server/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mean/server/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern/server/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern/server/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn/server/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn/server/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/hono/typescript/server/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mean/server/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern/server/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn/server/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/server/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/celtrix.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import "../index.js"; 4 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.type.ts: -------------------------------------------------------------------------------- 1 | // Your all User Type Code Goes Here 2 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.constant.ts: -------------------------------------------------------------------------------- 1 | // Your all User Constant Code Goes Here 2 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.validator.ts: -------------------------------------------------------------------------------- 1 | // Your User Validator Code Goes Here 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.tgz 3 | .npm/ 4 | dist/ 5 | coverage/ 6 | .DS_Store 7 | .env 8 | scripts/test* -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /templates/mean/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here -------------------------------------------------------------------------------- /templates/mern/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here -------------------------------------------------------------------------------- /templates/mevn/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here 4 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here 4 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here 4 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/firestore.indexes.json: -------------------------------------------------------------------------------- 1 | { 2 | "indexes": [], 3 | "fieldOverrides": [] 4 | } 5 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/firestore.indexes.json: -------------------------------------------------------------------------------- 1 | { 2 | "indexes": [], 3 | "fieldOverrides": [] 4 | } 5 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": true, 4 | "tabWidth": 2, 5 | "useTabs": false 6 | } 7 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here 4 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/server/.env.example: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGO_URI=your_mongodb_uri_here 3 | JWT_SECRET=your_jwt_secret_here 4 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/.env.example: -------------------------------------------------------------------------------- 1 | # Prisma 2 | # https://www.prisma.io/docs/reference/database-reference/connection-urls#env 3 | DATABASE_URL="" -------------------------------------------------------------------------------- /templates/hono/typescript/server/.env.example: -------------------------------------------------------------------------------- 1 | # Prisma 2 | # https://www.prisma.io/docs/reference/database-reference/connection-urls#env 3 | DATABASE_URL="" -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.service.ts: -------------------------------------------------------------------------------- 1 | // Your User Service Code Goes Here 2 | 3 | class UserService {} 4 | 5 | export default new UserService(); 6 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run test || exit 1 5 | npm run format || exit 1 6 | npm run lint || exit 1 -------------------------------------------------------------------------------- /templates/hono/typescript/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Hono } from 'hono' 2 | 3 | const app = new Hono() 4 | 5 | app.get('/', (c) => { 6 | return c.text('Hello Hono!') 7 | }) 8 | 9 | export default app 10 | -------------------------------------------------------------------------------- /templates/hono/typescript/server/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Hono } from 'hono' 2 | 3 | const app = new Hono() 4 | 5 | app.get('/', (c) => { 6 | return c.text('Hello Hono!') 7 | }) 8 | 9 | export default app 10 | -------------------------------------------------------------------------------- /commands/scaffold.js: -------------------------------------------------------------------------------- 1 | import { setupProject } from "../utils/project.js"; 2 | 3 | export async function createProject(projectName, config, installDeps) { 4 | return await setupProject(projectName, config, installDeps); 5 | } 6 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/__test__/index.test.ts: -------------------------------------------------------------------------------- 1 | function sum(a: number, b: number): number { 2 | return a + b; 3 | } 4 | 5 | test('adds 1 + 2 to equal 3', () => { 6 | expect(sum(1, 2)).toBe(3); 7 | }); 8 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/constant/env.constant.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | import { EnvSchema } from '../validator/env.validator'; 3 | dotenv.config(); 4 | 5 | export const env = EnvSchema.parse(process.env); 6 | 7 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /templates/mean/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mern/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mevn/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/hono/javascript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/hono/typescript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/hono/javascript/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log 17 | .wrangler -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore artifacts: 2 | build 3 | coverage 4 | node_modules 5 | dist 6 | .env 7 | .env.example 8 | .DS_Store 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | .vscode 14 | .idea 15 | *.suo -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.routes.ts: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import userController from './user.controller'; 3 | const router: Router = Router(); 4 | 5 | router.get('/findUser', userController.getUser); 6 | 7 | export { router as UserRoutes }; 8 | -------------------------------------------------------------------------------- /templates/nextjs/app/api/router/route.js: -------------------------------------------------------------------------------- 1 | import { NextRequest, NextResponse } from "next/server"; 2 | 3 | export async function GET(req) { 4 | return NextResponse.json({message:"Hello from Backend:3000"}); 5 | } 6 | 7 | // Test API http://localhost:3000/api/router in postman or bruno ! -------------------------------------------------------------------------------- /templates/hono/typescript/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log 17 | .wrangler 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log 17 | firebase.json -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .env 4 | .env.local 5 | .git 6 | .gitignore 7 | README.md 8 | *.md 9 | .DS_Store 10 | dist 11 | build 12 | .vscode 13 | .idea 14 | coverage 15 | .nyc_output 16 | *.log 17 | firebase.json -------------------------------------------------------------------------------- /utils/logger.js: -------------------------------------------------------------------------------- 1 | import chalk from "chalk"; 2 | 3 | export const logger = { 4 | info: (msg) => console.log(chalk.blue(msg)), 5 | success: (msg) => console.log(chalk.green(msg)), 6 | warn: (msg) => console.log(chalk.yellow(msg)), 7 | error: (msg) => console.log(chalk.red(msg)), 8 | }; 9 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import tailwindcss from '@tailwindcss/vite' 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(),tailwindcss()], 8 | }) 9 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import tailwindcss from '@tailwindcss/vite' 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(),tailwindcss()], 8 | }) 9 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import tailwindcss from '@tailwindcss/vite' 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [react(), tailwindcss()], 8 | }) 9 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import tailwindcss from '@tailwindcss/vite' 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [react(), tailwindcss()], 8 | }) 9 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.tsx' 5 | 6 | createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💬 Other 3 | about: Questions, documentation updates, or other types of requests 4 | title: "[OTHER] " 5 | labels: discussion 6 | --- 7 | 8 | ### Description 9 | What’s your query, suggestion, or feedback? 10 | 11 | ### Additional Info 12 | Add context or links if relevant. 13 | 14 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/firestore.rules: -------------------------------------------------------------------------------- 1 | rules_version = '2'; 2 | 3 | service cloud.firestore { 4 | match /databases/{database}/documents { 5 | // Allow read/write access to authenticated users only 6 | match /{document=**} { 7 | allow read, write: if request.auth != null; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/firestore.rules: -------------------------------------------------------------------------------- 1 | rules_version = '2'; 2 | 3 | service cloud.firestore { 4 | match /databases/{database}/documents { 5 | // Allow read/write access to authenticated users only 6 | match /{document=**} { 7 | allow read, write: if request.auth != null; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "strict": true, 7 | "skipLibCheck": true, 8 | "lib": [ 9 | "ESNext" 10 | ], 11 | "jsx": "react-jsx", 12 | "jsxImportSource": "hono/jsx" 13 | }, 14 | } -------------------------------------------------------------------------------- /templates/hono/typescript/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "strict": true, 7 | "skipLibCheck": true, 8 | "lib": [ 9 | "ESNext" 10 | ], 11 | "jsx": "react-jsx", 12 | "jsxImportSource": "hono/jsx" 13 | }, 14 | } -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/api/user/v1/user.utils.ts: -------------------------------------------------------------------------------- 1 | // Your all User Utils Code Goes Here 2 | 3 | class User_Utils { 4 | async FIND_USER_BY_ID() { 5 | // Your User Utils Code Goes Here 6 | return 'Finding User By ID'; 7 | } 8 | 9 | async FIND_USER_BY_EMAIL() { 10 | // Your User Utils Code Goes Here 11 | } 12 | } 13 | 14 | export default new User_Utils(); 15 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "honotst", 3 | "type": "module", 4 | "scripts": { 5 | "dev": "wrangler dev", 6 | "deploy": "wrangler deploy --minify", 7 | "cf-typegen": "wrangler types --env-interface CloudflareBindings" 8 | }, 9 | "dependencies": { 10 | "hono": "^4.9.9" 11 | }, 12 | "devDependencies": { 13 | "wrangler": "^4.4.0" 14 | } 15 | } -------------------------------------------------------------------------------- /templates/hono/typescript/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /templates/hono/typescript/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "honotst", 3 | "type": "module", 4 | "scripts": { 5 | "dev": "wrangler dev", 6 | "deploy": "wrangler deploy --minify", 7 | "cf-typegen": "wrangler types --env-interface CloudflareBindings" 8 | }, 9 | "dependencies": { 10 | "hono": "^4.9.9" 11 | }, 12 | "devDependencies": { 13 | "wrangler": "^4.4.0" 14 | } 15 | } -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/server.ts: -------------------------------------------------------------------------------- 1 | import { server } from './src/config/socket.config'; 2 | import { env } from './src/constant/env.constant'; 3 | import connectDB from './src/config/db.config'; 4 | 5 | server.listen(env.PORT, async() => { 6 | 7 | await connectDB(); 8 | 9 | console.log( 10 | `Server is running on http://${env.HOST}:${env.PORT} in ${env.NODE_ENV} mode`, 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const userSchema = new mongoose.Schema( 4 | { 5 | name: { type: String, required: true }, 6 | email: { type: String, required: true, unique: true }, 7 | password: { type: String, required: true }, 8 | }, 9 | { timestamps: true } 10 | ); 11 | 12 | module.exports = mongoose.model("User", userSchema); // ✅ CommonJS export 13 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const userSchema = new mongoose.Schema( 4 | { 5 | name: { type: String, required: true }, 6 | email: { type: String, required: true, unique: true }, 7 | password: { type: String, required: true }, 8 | }, 9 | { timestamps: true } 10 | ); 11 | 12 | module.exports = mongoose.model("User", userSchema); // ✅ CommonJS export 13 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const userSchema = new mongoose.Schema( 4 | { 5 | name: { type: String, required: true }, 6 | email: { type: String, required: true, unique: true }, 7 | password: { type: String, required: true }, 8 | }, 9 | { timestamps: true } 10 | ); 11 | 12 | module.exports = mongoose.model("User", userSchema); // ✅ CommonJS export 13 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/.env.example: -------------------------------------------------------------------------------- 1 | # Firebase Configuration 2 | VITE_FIREBASE_API_KEY=your_firebase_api_key 3 | VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com 4 | VITE_FIREBASE_PROJECT_ID=your_project_id 5 | VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com 6 | VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id 7 | VITE_FIREBASE_APP_ID=your_app_id 8 | VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/.env.example: -------------------------------------------------------------------------------- 1 | # Firebase Configuration 2 | VITE_FIREBASE_API_KEY=your_firebase_api_key 3 | VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com 4 | VITE_FIREBASE_PROJECT_ID=your_project_id 5 | VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com 6 | VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id 7 | VITE_FIREBASE_APP_ID=your_app_id 8 | VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const { register, login } = require("../controllers/authController.js"); 3 | 4 | const router = express.Router(); 5 | 6 | // POST /api/auth/register 7 | router.post("/register", register); 8 | 9 | // POST /api/auth/login 10 | router.post("/login", login); 11 | 12 | module.exports = router; // ✅ use module.exports instead of export default 13 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const { register, login } = require("../controllers/authController.js"); 3 | 4 | const router = express.Router(); 5 | 6 | // POST /api/auth/register 7 | router.post("/register", register); 8 | 9 | // POST /api/auth/login 10 | router.post("/login", login); 11 | 12 | module.exports = router; // ✅ use module.exports instead of export default 13 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const { register, login } = require("../controllers/authController.js"); 3 | 4 | const router = express.Router(); 5 | 6 | // POST /api/auth/register 7 | router.post("/register", register); 8 | 9 | // POST /api/auth/login 10 | router.post("/login", login); 11 | 12 | module.exports = router; // ✅ use module.exports instead of export default 13 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + Vite 2 | 3 | This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Vue 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js'; 2 | import globals from 'globals'; 3 | import tseslint from 'typescript-eslint'; 4 | import { defineConfig } from 'eslint/config'; 5 | 6 | export default defineConfig([ 7 | { 8 | files: ['**/*.{js,mjs,cjs,ts,mts,cts}'], 9 | plugins: { js }, 10 | extends: ['js/recommended'], 11 | languageOptions: { globals: globals.browser }, 12 | }, 13 | tseslint.configs.recommended, 14 | ]); 15 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Vue + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: ✨ Feature Request 3 | about: Suggest a new feature or improvement 4 | title: "[FEATURE] " 5 | labels: enhancement 6 | --- 7 | 8 | ### Description 9 | Describe the feature or improvement you’d like to see. 10 | 11 | ### Motivation 12 | Why is this feature important? 13 | 14 | ### Alternatives 15 | Any alternative approaches or solutions? 16 | 17 | ### Additional Context 18 | Add any other details or references. 19 | 20 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | }, 16 | "firestore": { 17 | "rules": "firestore.rules", 18 | "indexes": "firestore.indexes.json" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | }, 16 | "firestore": { 17 | "rules": "firestore.rules", 18 | "indexes": "firestore.indexes.json" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | React + Tailwind + Firebase 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | React + Tailwind + Firebase 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/mean/server/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Node.js LTS version as base image 2 | FROM node:20-alpine 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Copy package files 8 | COPY package*.json ./ 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | # Copy application code 14 | COPY . . 15 | 16 | # Expose port 17 | EXPOSE 5000 18 | 19 | # Set environment variables (can be overridden) 20 | ENV NODE_ENV=production 21 | 22 | # Start the application 23 | CMD ["node", "server.js"] -------------------------------------------------------------------------------- /templates/mevn/server/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Node.js LTS version as base image 2 | FROM node:20-alpine 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Copy package files 8 | COPY package*.json ./ 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | # Copy application code 14 | COPY . . 15 | 16 | # Expose port 17 | EXPOSE 5000 18 | 19 | # Set environment variables (can be overridden) 20 | ENV NODE_ENV=production 21 | 22 | # Start the application 23 | CMD ["node", "server.js"] -------------------------------------------------------------------------------- /templates/hono/javascript/server/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Node.js LTS version as base image 2 | FROM node:20-alpine 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Copy package files 8 | COPY package*.json ./ 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | # Copy application code 14 | COPY . . 15 | 16 | # Expose port 17 | EXPOSE 8787 18 | 19 | # Set environment variables 20 | ENV NODE_ENV=production 21 | 22 | # Start the application with Wrangler 23 | CMD ["npm", "run", "dev"] -------------------------------------------------------------------------------- /templates/mern/server/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Node.js LTS version as base image 2 | FROM node:20-alpine 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Copy package files 8 | COPY package*.json ./ 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | # Copy application code 14 | COPY . . 15 | 16 | # Expose port 17 | EXPOSE 5000 18 | 19 | # Set environment variables (can be overridden) 20 | ENV NODE_ENV=production 21 | 22 | # Start the application 23 | CMD ["node", "server.js"] 24 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + TypeScript + Vite 2 | 3 | This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` 4 | 5 | 16 | 17 | 31 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | 17 | 31 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/config/socket.config.ts: -------------------------------------------------------------------------------- 1 | // Your Socket Config Code Goes Here 2 | 3 | import { Server , Socket} from 'socket.io'; 4 | import http from 'http'; 5 | import app from '../app'; 6 | import { env } from '../constant/env.constant'; 7 | 8 | const server = http.createServer(app); 9 | 10 | const io = new Server(server, { 11 | cors: { 12 | origin: env.CLIENT_URL, 13 | methods: ['GET', 'POST' , 'PUT' , 'DELETE'], 14 | credentials: true, 15 | optionsSuccessStatus: 200, 16 | allowedHeaders: ['Content-Type', 'Authorization'], 17 | maxAge: 86400, 18 | preflightContinue: false, 19 | 20 | 21 | }, 22 | }); 23 | 24 | io.on('connection', (socket : Socket ) => { 25 | console.log('A user connected:', socket.id); 26 | 27 | socket.on('disconnect', () => { 28 | console.log('User disconnected:', socket.id); 29 | }); 30 | }); 31 | 32 | export { server, io }; -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@tailwindcss/vite": "^4.1.12", 14 | "firebase": "^10.14.1", 15 | "react": "^19.1.1", 16 | "react-dom": "^19.1.1", 17 | "react-router-dom": "^6.28.0", 18 | "tailwindcss": "^4.1.12" 19 | }, 20 | "devDependencies": { 21 | "@eslint/js": "^9.33.0", 22 | "@types/react": "^19.1.10", 23 | "@types/react-dom": "^19.1.7", 24 | "@vitejs/plugin-react": "^5.0.0", 25 | "eslint": "^9.33.0", 26 | "eslint-plugin-react-hooks": "^5.2.0", 27 | "eslint-plugin-react-refresh": "^0.4.20", 28 | "globals": "^16.3.0", 29 | "vite": "^7.1.2" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import { defineConfig, globalIgnores } from 'eslint/config' 6 | 7 | export default defineConfig([ 8 | globalIgnores(['dist']), 9 | { 10 | files: ['**/*.{js,jsx}'], 11 | extends: [ 12 | js.configs.recommended, 13 | reactHooks.configs['recommended-latest'], 14 | reactRefresh.configs.vite, 15 | ], 16 | languageOptions: { 17 | ecmaVersion: 2020, 18 | globals: globals.browser, 19 | parserOptions: { 20 | ecmaVersion: 'latest', 21 | ecmaFeatures: { jsx: true }, 22 | sourceType: 'module', 23 | }, 24 | }, 25 | rules: { 26 | 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], 27 | }, 28 | }, 29 | ]) 30 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. 13 | -------------------------------------------------------------------------------- /templates/hono/javascript/server/wrangler.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/wrangler/config-schema.json", 3 | "name": "honotst", 4 | "main": "src/index.ts", 5 | "compatibility_date": "2025-10-02" 6 | // "compatibility_flags": [ 7 | // "nodejs_compat" 8 | // ], 9 | // "vars": { 10 | // "MY_VAR": "my-variable" 11 | // }, 12 | // "kv_namespaces": [ 13 | // { 14 | // "binding": "MY_KV_NAMESPACE", 15 | // "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 16 | // } 17 | // ], 18 | // "r2_buckets": [ 19 | // { 20 | // "binding": "MY_BUCKET", 21 | // "bucket_name": "my-bucket" 22 | // } 23 | // ], 24 | // "d1_databases": [ 25 | // { 26 | // "binding": "MY_DB", 27 | // "database_name": "my-database", 28 | // "database_id": "" 29 | // } 30 | // ], 31 | // "ai": { 32 | // "binding": "AI" 33 | // }, 34 | // "observability": { 35 | // "enabled": true, 36 | // "head_sampling_rate": 1 37 | // } 38 | } -------------------------------------------------------------------------------- /templates/hono/typescript/server/wrangler.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/wrangler/config-schema.json", 3 | "name": "honotst", 4 | "main": "src/index.ts", 5 | "compatibility_date": "2025-10-02" 6 | // "compatibility_flags": [ 7 | // "nodejs_compat" 8 | // ], 9 | // "vars": { 10 | // "MY_VAR": "my-variable" 11 | // }, 12 | // "kv_namespaces": [ 13 | // { 14 | // "binding": "MY_KV_NAMESPACE", 15 | // "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 16 | // } 17 | // ], 18 | // "r2_buckets": [ 19 | // { 20 | // "binding": "MY_BUCKET", 21 | // "bucket_name": "my-bucket" 22 | // } 23 | // ], 24 | // "d1_databases": [ 25 | // { 26 | // "binding": "MY_DB", 27 | // "database_name": "my-database", 28 | // "database_id": "" 29 | // } 30 | // ], 31 | // "ai": { 32 | // "binding": "AI" 33 | // }, 34 | // "observability": { 35 | // "enabled": true, 36 | // "head_sampling_rate": 1 37 | // } 38 | } -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc -b && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@tailwindcss/vite": "^4.1.12", 14 | "firebase": "^10.14.1", 15 | "react": "^19.1.1", 16 | "react-dom": "^19.1.1", 17 | "react-router-dom": "^6.28.0", 18 | "tailwindcss": "^4.1.12" 19 | }, 20 | "devDependencies": { 21 | "@eslint/js": "^9.33.0", 22 | "@types/react": "^19.1.10", 23 | "@types/react-dom": "^19.1.7", 24 | "@vitejs/plugin-react": "^5.0.0", 25 | "eslint": "^9.33.0", 26 | "eslint-plugin-react-hooks": "^5.2.0", 27 | "eslint-plugin-react-refresh": "^0.4.20", 28 | "globals": "^16.3.0", 29 | "typescript": "~5.8.3", 30 | "typescript-eslint": "^8.39.1", 31 | "vite": "^7.1.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /templates/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | client: 5 | build: 6 | context: ./client 7 | dockerfile: Dockerfile 8 | ports: 9 | - "3000:80" 10 | depends_on: 11 | - server 12 | environment: 13 | - VITE_API_URL=http://localhost:5000 14 | 15 | server: 16 | build: 17 | context: ./server 18 | dockerfile: Dockerfile 19 | ports: 20 | - "5000:5000" 21 | environment: 22 | - NODE_ENV=production 23 | - MONGO_URI=${MONGO_URI} 24 | - PORT=5000 25 | volumes: 26 | - ./server:/app 27 | - /app/node_modules 28 | restart: unless-stopped 29 | 30 | # MongoDB service (optional, for development) 31 | mongodb: 32 | image: mongo:7 33 | ports: 34 | - "27017:27017" 35 | volumes: 36 | - mongodb_data:/data/db 37 | environment: 38 | - MONGO_INITDB_ROOT_USERNAME=admin 39 | - MONGO_INITDB_ROOT_PASSWORD=password 40 | 41 | volumes: 42 | mongodb_data: 43 | 44 | networks: 45 | default: 46 | name: app-network 47 | -------------------------------------------------------------------------------- /templates/mean/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | 5 | dotenv.config(); 6 | 7 | const app = express(); 8 | 9 | const mongoUri = process.env.MONGO_URI; 10 | const port = process.env.PORT || 5000; 11 | 12 | // Middleware to parse JSON 13 | app.use(express.json()); 14 | 15 | // Connect to MongoDB and start server 16 | // Safe MongoDB connection for scaffold 17 | if (!mongoUri || mongoUri === "your_mongodb_uri_here") { 18 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 19 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 20 | } else { 21 | mongoose 22 | .connect(mongoUri) 23 | .then(() => { 24 | console.log("MongoDB connected"); 25 | app.listen(port, () => console.log(`Server running on port ${port}`)); 26 | }) 27 | .catch((err) => { 28 | console.error("MongoDB connection failed:", err.message); 29 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 30 | }); 31 | } -------------------------------------------------------------------------------- /templates/mern/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | 5 | dotenv.config(); 6 | 7 | const app = express(); 8 | 9 | const mongoUri = process.env.MONGO_URI; 10 | const port = process.env.PORT || 5000; 11 | 12 | // Middleware to parse JSON 13 | app.use(express.json()); 14 | 15 | // Connect to MongoDB and start server 16 | // Safe MongoDB connection for scaffold 17 | if (!mongoUri || mongoUri === "your_mongodb_uri_here") { 18 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 19 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 20 | } else { 21 | mongoose 22 | .connect(mongoUri) 23 | .then(() => { 24 | console.log("MongoDB connected"); 25 | app.listen(port, () => console.log(`Server running on port ${port}`)); 26 | }) 27 | .catch((err) => { 28 | console.error("MongoDB connection failed:", err.message); 29 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 30 | }); 31 | } -------------------------------------------------------------------------------- /templates/mevn/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | 5 | dotenv.config(); 6 | 7 | const app = express(); 8 | 9 | const mongoUri = process.env.MONGO_URI; 10 | const port = process.env.PORT || 5000; 11 | 12 | // Middleware to parse JSON 13 | app.use(express.json()); 14 | 15 | // Connect to MongoDB and start server 16 | // Safe MongoDB connection for scaffold 17 | if (!mongoUri || mongoUri === "your_mongodb_uri_here") { 18 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 19 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 20 | } else { 21 | mongoose 22 | .connect(mongoUri) 23 | .then(() => { 24 | console.log("MongoDB connected"); 25 | app.listen(port, () => console.log(`Server running on port ${port}`)); 26 | }) 27 | .catch((err) => { 28 | console.error("MongoDB connection failed:", err.message); 29 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 30 | }); 31 | } -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/src/firebase/config.js: -------------------------------------------------------------------------------- 1 | import { initializeApp } from 'firebase/app'; 2 | import { getAuth } from 'firebase/auth'; 3 | import { getFirestore } from 'firebase/firestore'; 4 | import { getStorage } from 'firebase/storage'; 5 | 6 | // Your web app's Firebase configuration 7 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 8 | const firebaseConfig = { 9 | apiKey: import.meta.env.VITE_FIREBASE_API_KEY, 10 | authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN, 11 | projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID, 12 | storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET, 13 | messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID, 14 | appId: import.meta.env.VITE_FIREBASE_APP_ID, 15 | measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID 16 | }; 17 | 18 | // Initialize Firebase 19 | const app = initializeApp(firebaseConfig); 20 | 21 | // Initialize Firebase services 22 | export const auth = getAuth(app); 23 | export const db = getFirestore(app); 24 | export const storage = getStorage(app); 25 | 26 | export default app; 27 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/src/firebase/config.ts: -------------------------------------------------------------------------------- 1 | import { initializeApp } from 'firebase/app'; 2 | import { getAuth } from 'firebase/auth'; 3 | import { getFirestore } from 'firebase/firestore'; 4 | import { getStorage } from 'firebase/storage'; 5 | 6 | // Your web app's Firebase configuration 7 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 8 | const firebaseConfig = { 9 | apiKey: import.meta.env.VITE_FIREBASE_API_KEY, 10 | authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN, 11 | projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID, 12 | storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET, 13 | messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID, 14 | appId: import.meta.env.VITE_FIREBASE_APP_ID, 15 | measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID 16 | }; 17 | 18 | // Initialize Firebase 19 | const app = initializeApp(firebaseConfig); 20 | 21 | // Initialize Firebase services 22 | export const auth = getAuth(app); 23 | export const db = getFirestore(app); 24 | export const storage = getStorage(app); 25 | 26 | export default app; 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 celtrix-os 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import react from 'eslint-plugin-react' 6 | 7 | export default [ 8 | { ignores: ['dist'] }, 9 | { 10 | files: ['**/*.{js,jsx}'], 11 | languageOptions: { 12 | ecmaVersion: 2020, 13 | globals: globals.browser, 14 | parserOptions: { 15 | ecmaVersion: 'latest', 16 | ecmaFeatures: { jsx: true }, 17 | sourceType: 'module', 18 | }, 19 | }, 20 | plugins: { 21 | react, 22 | 'react-hooks': reactHooks, 23 | 'react-refresh': reactRefresh, 24 | }, 25 | rules: { 26 | ...js.configs.recommended.rules, 27 | ...react.configs.recommended.rules, 28 | ...reactHooks.configs.recommended.rules, 29 | 'react/jsx-no-target-blank': 'off', 30 | 'react-refresh/only-export-components': [ 31 | 'warn', 32 | { allowConstantExport: true }, 33 | ], 34 | }, 35 | settings: { react: { version: '18.3' } }, 36 | }, 37 | ] 38 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import reactLogo from './assets/react.svg' 3 | import viteLogo from '/vite.svg' 4 | import './App.css' 5 | 6 | function App() { 7 | const [count, setCount] = useState(0) 8 | 9 | return ( 10 | <> 11 |
12 | 13 | Vite logo 14 | 15 | 16 | React logo 17 | 18 |
19 |

Vite + React

20 |
21 | 24 |

25 | Edit src/App.jsx and save to test HMR 26 |

27 |
28 |

29 | Click on the Vite and React logos to learn more 30 |

31 |
32 | Powered by Celtrix 33 |
34 | 35 | ) 36 | } 37 | 38 | export default App 39 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import reactLogo from './assets/react.svg' 3 | import viteLogo from '/vite.svg' 4 | import './App.css' 5 | 6 | function App() { 7 | const [count, setCount] = useState(0) 8 | 9 | return ( 10 | <> 11 |
12 | 13 | Vite logo 14 | 15 | 16 | React logo 17 | 18 |
19 |

Vite + React

20 |
21 | 24 |

25 | Edit src/App.tsx and save to test HMR 26 |

27 |
28 |

29 | Click on the Vite and React logos to learn more 30 |

31 |
32 | Powered by Celtrix 33 |
34 | 35 | ) 36 | } 37 | 38 | export default App 39 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import react from 'eslint-plugin-react' 6 | import tseslint from 'typescript-eslint' 7 | 8 | export default tseslint.config( 9 | { ignores: ['dist'] }, 10 | { 11 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 12 | files: ['**/*.{ts,tsx}'], 13 | languageOptions: { 14 | ecmaVersion: 2020, 15 | globals: globals.browser, 16 | parserOptions: { 17 | ecmaVersion: 'latest', 18 | ecmaFeatures: { jsx: true }, 19 | sourceType: 'module', 20 | }, 21 | }, 22 | plugins: { 23 | react, 24 | 'react-hooks': reactHooks, 25 | 'react-refresh': reactRefresh, 26 | }, 27 | rules: { 28 | ...react.configs.recommended.rules, 29 | ...reactHooks.configs.recommended.rules, 30 | 'react/jsx-no-target-blank': 'off', 31 | 'react-refresh/only-export-components': [ 32 | 'warn', 33 | { allowConstantExport: true }, 34 | ], 35 | }, 36 | settings: { react: { version: '18.3' } }, 37 | }, 38 | ) 39 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/validator/env.validator.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const EnvSchema = z.object({ 4 | PORT: z.string().default('5000'), 5 | HOST: z.string().default('localhost'), 6 | 7 | NODE_ENV: z 8 | .enum(['development', 'production', 'test']) 9 | .default('development'), 10 | CORS_ENABLED: z 11 | .string() 12 | .default('true') 13 | .transform((v) => v === 'true'), 14 | RATE_LIMIT_ENABLED: z 15 | .string() 16 | .default('true') 17 | .transform((v) => v === 'true'), 18 | 19 | CLIENT_URL: z.string().url().default('http://localhost:5137'), 20 | 21 | JWT_SECRET: z.string().min(1, "JWT_SECRET is required"), 22 | JWT_EXPIRATION: z.string().default('7d'), 23 | 24 | DB_NAME: z.string().min(1, "DB_NAME is required"), 25 | DB_CONNECTION_STRING: z.string().min(1, "DB_CONNECTION_STRING is required"), 26 | 27 | REDIS_HOST: z.string().default('localhost'), 28 | REDIS_PORT: z.string().default('6379'), 29 | REDIS_PASSWORD: z.string().optional().default(''), 30 | 31 | UPLOAD_DIR: z.string().default('./uploads'), 32 | TEMP_DIR: z.string().default('./temp'), 33 | MAX_FILE_SIZE: z.string() 34 | .regex(/^\d+[kmgt]?b$/i, "MAX_FILE_SIZE must be in format like '10mb', '1gb'") 35 | .default('10mb'), 36 | }); -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 41 | 42 | 47 | -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | const cors = require("cors"); 5 | const helmet = require("helmet"); 6 | const morgan = require("morgan"); 7 | const authRoutes = require("./routes/authRoutes.js"); 8 | 9 | 10 | dotenv.config(); 11 | 12 | const app = express(); 13 | const mongoURI = process.env.MONGO_URI; 14 | const port = process.env.PORT || 5000; 15 | 16 | // Middleware 17 | app.use(express.json()); 18 | app.use(cors()); 19 | app.use(helmet()); 20 | app.use(morgan("dev")); 21 | 22 | // Routes 23 | app.use("/api/auth", authRoutes); 24 | 25 | // Safe MongoDB connection for scaffold 26 | if (!mongoURI || mongoURI === "your_mongodb_uri_here") { 27 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 28 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 29 | } else { 30 | mongoose 31 | .connect(mongoURI) 32 | .then(() => { 33 | console.log("MongoDB connected"); 34 | app.listen(port, () => console.log(`Server running on port ${port}`)); 35 | }) 36 | .catch((err) => { 37 | console.error("MongoDB connection failed:", err.message); 38 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | const cors = require("cors"); 5 | const helmet = require("helmet"); 6 | const morgan = require("morgan"); 7 | const authRoutes = require("./routes/authRoutes.js"); 8 | 9 | 10 | dotenv.config(); 11 | 12 | const app = express(); 13 | const mongoURI = process.env.MONGO_URI; 14 | const port = process.env.PORT || 5000; 15 | 16 | // Middleware 17 | app.use(express.json()); 18 | app.use(cors()); 19 | app.use(helmet()); 20 | app.use(morgan("dev")); 21 | 22 | // Routes 23 | app.use("/api/auth", authRoutes); 24 | 25 | // Safe MongoDB connection for scaffold 26 | if (!mongoURI || mongoURI === "your_mongodb_uri_here") { 27 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 28 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 29 | } else { 30 | mongoose 31 | .connect(mongoURI) 32 | .then(() => { 33 | console.log("MongoDB connected"); 34 | app.listen(port, () => console.log(`Server running on port ${port}`)); 35 | }) 36 | .catch((err) => { 37 | console.error("MongoDB connection failed:", err.message); 38 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "jest", 7 | "build": "tsc", 8 | "lint": "eslint . --ext .ts", 9 | "format": "prettier --write .", 10 | "dev": "ts-node-dev --respawn --transpile-only server.ts", 11 | "prepare": "husky" 12 | }, 13 | "jest": { 14 | "preset": "ts-jest", 15 | "testEnvironment": "node" 16 | }, 17 | "author": "", 18 | "license": "ISC", 19 | "description": "", 20 | "devDependencies": { 21 | "@eslint/js": "^9.37.0", 22 | "@types/jest": "^30.0.0", 23 | "eslint": "^9.37.0", 24 | "eslint-config-xo": "^0.49.0", 25 | "globals": "^16.4.0", 26 | "husky": "^9.1.7", 27 | "jest": "^30.2.0", 28 | "jiti": "^2.6.1", 29 | "prettier": "3.6.2", 30 | "ts-jest": "^29.4.4", 31 | "typescript": "^5.9.3", 32 | "typescript-eslint": "^8.45.0" 33 | }, 34 | "dependencies": { 35 | "@types/cors": "^2.8.19", 36 | "@types/express": "^5.0.3", 37 | "@types/helmet": "^4.0.0", 38 | "@types/morgan": "^1.9.10", 39 | "cors": "^2.8.5", 40 | "dotenv": "^17.2.3", 41 | "express": "^5.1.0", 42 | "helmet": "^8.1.0", 43 | "mongoose": "^8.19.0", 44 | "morgan": "^1.10.1", 45 | "socket.io": "^4.8.1", 46 | "ts-node-dev": "^2.0.0", 47 | "zod": "^4.1.11" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | const cors = require("cors"); 5 | const helmet = require("helmet"); 6 | const morgan = require("morgan"); 7 | const authRoutes = require("./routes/authRoutes.js"); 8 | 9 | 10 | dotenv.config(); 11 | 12 | const app = express(); 13 | const mongoURI = process.env.MONGO_URI; 14 | const port = process.env.PORT || 5000; 15 | 16 | // Middleware 17 | app.use(express.json()); 18 | app.use(cors()); 19 | app.use(helmet()); 20 | app.use(morgan("dev")); 21 | 22 | // Routes 23 | app.use("/api/auth", authRoutes); 24 | 25 | // Safe MongoDB connection for scaffold 26 | if (!mongoURI || mongoURI === "your_mongodb_uri_here") { 27 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 28 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 29 | } else { 30 | mongoose 31 | .connect(mongoURI) 32 | .then(() => { 33 | console.log("MongoDB connected"); 34 | app.listen(port, () => console.log(`Server running on port ${port}`)); 35 | }) 36 | .catch((err) => { 37 | console.error("MongoDB connection failed:", err.message); 38 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | 44 | .powered-badge { 45 | position: fixed; 46 | bottom: 1.5rem; 47 | left: 1.5rem; 48 | font-size: 0.875rem; 49 | background-color: black; 50 | color: white; 51 | padding: 0.5rem 1rem; 52 | border-radius: 0.75rem; 53 | box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 54 | 0 4px 6px -2px rgba(0,0,0,0.05); 55 | opacity: 0.8; 56 | transition: opacity 0.2s ease-in-out; 57 | } 58 | 59 | .powered-badge:hover { 60 | opacity: 1; 61 | } 62 | 63 | .powered-badge .celtrix { 64 | font-weight: 600; 65 | color: #4ade80; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | 44 | .powered-badge { 45 | position: fixed; 46 | bottom: 1.5rem; 47 | left: 1.5rem; 48 | font-size: 0.875rem; 49 | background-color: black; 50 | color: white; 51 | padding: 0.5rem 1rem; 52 | border-radius: 0.75rem; 53 | box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 54 | 0 4px 6px -2px rgba(0,0,0,0.05); 55 | opacity: 0.8; 56 | transition: opacity 0.2s ease-in-out; 57 | } 58 | 59 | .powered-badge:hover { 60 | opacity: 1; 61 | } 62 | 63 | .powered-badge .celtrix { 64 | font-weight: 600; 65 | color: #4ade80; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | const cors = require("cors"); 5 | const helmet = require("helmet"); 6 | const morgan = require("morgan"); 7 | const authRoutes = require("./routes/authRoutes.js"); 8 | 9 | 10 | dotenv.config(); 11 | 12 | const app = express(); 13 | const mongoURI = process.env.MONGO_URI; 14 | const port = process.env.PORT || 5000; 15 | 16 | // Middleware 17 | app.use(express.json()); 18 | app.use(cors()); 19 | app.use(helmet()); 20 | app.use(morgan("dev")); 21 | 22 | // Routes 23 | app.use("/api/auth", authRoutes); 24 | 25 | // Safe MongoDB connection for scaffold 26 | if (!mongoURI || mongoURI === "your_mongodb_uri_here") { 27 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 28 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 29 | } else { 30 | mongoose 31 | .connect(mongoURI) 32 | .then(() => { 33 | console.log("MongoDB connected"); 34 | app.listen(port, () => console.log(`Server running on port ${port}`)); 35 | }) 36 | .catch((err) => { 37 | console.error("MongoDB connection failed:", err.message); 38 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/server/server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const dotenv = require("dotenv"); 4 | const cors = require("cors"); 5 | const helmet = require("helmet"); 6 | const morgan = require("morgan"); 7 | const authRoutes = require("./routes/authRoutes.js"); 8 | 9 | 10 | dotenv.config(); 11 | 12 | const app = express(); 13 | const mongoURI = process.env.MONGO_URI; 14 | const port = process.env.PORT || 5000; 15 | 16 | // Middleware 17 | app.use(express.json()); 18 | app.use(cors()); 19 | app.use(helmet()); 20 | app.use(morgan("dev")); 21 | 22 | // Routes 23 | app.use("/api/auth", authRoutes); 24 | 25 | // Safe MongoDB connection for scaffold 26 | if (!mongoURI || mongoURI === "your_mongodb_uri_here") { 27 | console.warn("⚠️ No Mongo URI provided. Skipping DB connection. You can set it in .env later."); 28 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 29 | } else { 30 | mongoose 31 | .connect(mongoURI) 32 | .then(() => { 33 | console.log("MongoDB connected"); 34 | app.listen(port, () => console.log(`Server running on port ${port}`)); 35 | }) 36 | .catch((err) => { 37 | console.error("MongoDB connection failed:", err.message); 38 | app.listen(port, () => console.log(`Server running without DB on port ${port}`)); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/src/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; 3 | line-height: 1.5; 4 | font-weight: 400; 5 | 6 | color-scheme: light dark; 7 | color: rgba(255, 255, 255, 0.87); 8 | background-color: #242424; 9 | 10 | font-synthesis: none; 11 | text-rendering: optimizeLegibility; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | a { 17 | font-weight: 500; 18 | color: #646cff; 19 | text-decoration: inherit; 20 | } 21 | a:hover { 22 | color: #535bf2; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | display: flex; 28 | place-items: center; 29 | min-width: 320px; 30 | min-height: 100vh; 31 | } 32 | 33 | h1 { 34 | font-size: 3.2em; 35 | line-height: 1.1; 36 | } 37 | 38 | button { 39 | border-radius: 8px; 40 | border: 1px solid transparent; 41 | padding: 0.6em 1.2em; 42 | font-size: 1em; 43 | font-weight: 500; 44 | font-family: inherit; 45 | background-color: #1a1a1a; 46 | cursor: pointer; 47 | transition: border-color 0.25s; 48 | } 49 | button:hover { 50 | border-color: #646cff; 51 | } 52 | button:focus, 53 | button:focus-visible { 54 | outline: 4px auto -webkit-focus-ring-color; 55 | } 56 | 57 | @media (prefers-color-scheme: light) { 58 | :root { 59 | color: #213547; 60 | background-color: #ffffff; 61 | } 62 | a:hover { 63 | color: #747bff; 64 | } 65 | button { 66 | background-color: #f9f9f9; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; 3 | line-height: 1.5; 4 | font-weight: 400; 5 | 6 | color-scheme: light dark; 7 | color: rgba(255, 255, 255, 0.87); 8 | background-color: #242424; 9 | 10 | font-synthesis: none; 11 | text-rendering: optimizeLegibility; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | a { 17 | font-weight: 500; 18 | color: #646cff; 19 | text-decoration: inherit; 20 | } 21 | a:hover { 22 | color: #535bf2; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | display: flex; 28 | place-items: center; 29 | min-width: 320px; 30 | min-height: 100vh; 31 | } 32 | 33 | h1 { 34 | font-size: 3.2em; 35 | line-height: 1.1; 36 | } 37 | 38 | button { 39 | border-radius: 8px; 40 | border: 1px solid transparent; 41 | padding: 0.6em 1.2em; 42 | font-size: 1em; 43 | font-weight: 500; 44 | font-family: inherit; 45 | background-color: #1a1a1a; 46 | cursor: pointer; 47 | transition: border-color 0.25s; 48 | } 49 | button:hover { 50 | border-color: #646cff; 51 | } 52 | button:focus, 53 | button:focus-visible { 54 | outline: 4px auto -webkit-focus-ring-color; 55 | } 56 | 57 | @media (prefers-color-scheme: light) { 58 | :root { 59 | color: #213547; 60 | background-color: #ffffff; 61 | } 62 | a:hover { 63 | color: #747bff; 64 | } 65 | button { 66 | background-color: #f9f9f9; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { auth, db } from './firebase/config'; 3 | 4 | function App() { 5 | return ( 6 |
7 |
8 |

9 | React + Tailwind + Firebase 10 |

11 |
12 |
13 |

✅ React + Vite

14 |

Modern React setup with Vite

15 |
16 |
17 |

✅ Tailwind CSS

18 |

Utility-first CSS framework

19 |
20 |
21 |

✅ Firebase

22 |

Auth & Firestore configured

23 |
24 |
25 |
26 |

27 | Check src/firebase/config.js to configure your Firebase project 28 |

29 |
30 |
31 |
32 | ); 33 | } 34 | 35 | export default App; -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { auth, db } from './firebase/config'; 3 | 4 | function App() { 5 | return ( 6 |
7 |
8 |

9 | React + Tailwind + Firebase 10 |

11 |
12 |
13 |

✅ React + Vite

14 |

Modern React setup with Vite

15 |
16 |
17 |

✅ Tailwind CSS

18 |

Utility-first CSS framework

19 |
20 |
21 |

✅ Firebase

22 |

Auth & Firestore configured

23 |
24 |
25 |
26 |

27 | Check src/firebase/config.ts to configure your Firebase project 28 |

29 |
30 |
31 |
32 | ); 33 | } 34 | 35 | export default App; -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/javascript/client/README.md: -------------------------------------------------------------------------------- 1 | # React + Tailwind + Firebase 2 | 3 | A simple React application with Tailwind CSS and Firebase integration. 4 | 5 | ## Setup 6 | 7 | 1. **Install dependencies:** 8 | ```bash 9 | npm install 10 | ``` 11 | 12 | 2. **Configure Firebase:** 13 | - Create a Firebase project at [Firebase Console](https://console.firebase.google.com/) 14 | - Copy your Firebase config from Project Settings 15 | - Create a `.env` file in the root directory: 16 | ```env 17 | VITE_FIREBASE_API_KEY=your_api_key_here 18 | VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com 19 | VITE_FIREBASE_PROJECT_ID=your_project_id 20 | VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com 21 | VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id 22 | VITE_FIREBASE_APP_ID=your_app_id 23 | VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id 24 | ``` 25 | 26 | 3. **Start development server:** 27 | ```bash 28 | npm run dev 29 | ``` 30 | 31 | ## What's Included 32 | 33 | - ✅ **React 19** with Vite 34 | - ✅ **Tailwind CSS v4** for styling 35 | - ✅ **Firebase SDK** (Auth, Firestore, Storage) 36 | - ✅ **ESLint** configuration 37 | - ✅ **TypeScript** support (in TypeScript version) 38 | 39 | ## Firebase Services 40 | 41 | - **Authentication** - Ready to use 42 | - **Firestore** - NoSQL database 43 | - **Storage** - File storage 44 | - **Hosting** - Deploy with `firebase deploy` 45 | 46 | ## Scripts 47 | 48 | - `npm run dev` - Start development server 49 | - `npm run build` - Build for production 50 | - `npm run preview` - Preview production build 51 | - `npm run lint` - Run ESLint 52 | -------------------------------------------------------------------------------- /templates/react+tailwind+firebase/typescript/client/README.md: -------------------------------------------------------------------------------- 1 | # React + Tailwind + Firebase (TypeScript) 2 | 3 | A simple React application with TypeScript, Tailwind CSS and Firebase integration. 4 | 5 | ## Setup 6 | 7 | 1. **Install dependencies:** 8 | ```bash 9 | npm install 10 | ``` 11 | 12 | 2. **Configure Firebase:** 13 | - Create a Firebase project at [Firebase Console](https://console.firebase.google.com/) 14 | - Copy your Firebase config from Project Settings 15 | - Create a `.env` file in the root directory: 16 | ```env 17 | VITE_FIREBASE_API_KEY=your_api_key_here 18 | VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com 19 | VITE_FIREBASE_PROJECT_ID=your_project_id 20 | VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com 21 | VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id 22 | VITE_FIREBASE_APP_ID=your_app_id 23 | VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id 24 | ``` 25 | 26 | 3. **Start development server:** 27 | ```bash 28 | npm run dev 29 | ``` 30 | 31 | ## What's Included 32 | 33 | - ✅ **React 19** with Vite 34 | - ✅ **TypeScript** for type safety 35 | - ✅ **Tailwind CSS v4** for styling 36 | - ✅ **Firebase SDK** (Auth, Firestore, Storage) 37 | - ✅ **ESLint** configuration 38 | 39 | ## Firebase Services 40 | 41 | - **Authentication** - Ready to use 42 | - **Firestore** - NoSQL database 43 | - **Storage** - File storage 44 | - **Hosting** - Deploy with `firebase deploy` 45 | 46 | ## Scripts 47 | 48 | - `npm run dev` - Start development server 49 | - `npm run build` - Build for production 50 | - `npm run preview` - Preview production build 51 | - `npm run lint` - Run ESLint 52 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 39 | 40 | 68 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/client/src/style.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | :root { 4 | font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; 5 | line-height: 1.5; 6 | font-weight: 400; 7 | 8 | color-scheme: light dark; 9 | color: rgba(255, 255, 255, 0.87); 10 | background-color: #242424; 11 | 12 | font-synthesis: none; 13 | text-rendering: optimizeLegibility; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | a { 19 | font-weight: 500; 20 | color: #646cff; 21 | text-decoration: inherit; 22 | } 23 | a:hover { 24 | color: #535bf2; 25 | } 26 | 27 | body { 28 | margin: 0; 29 | display: flex; 30 | place-items: center; 31 | min-width: 320px; 32 | min-height: 100vh; 33 | } 34 | 35 | h1 { 36 | font-size: 3.2em; 37 | line-height: 1.1; 38 | } 39 | 40 | button { 41 | border-radius: 8px; 42 | border: 1px solid transparent; 43 | padding: 0.6em 1.2em; 44 | font-size: 1em; 45 | font-weight: 500; 46 | font-family: inherit; 47 | background-color: #1a1a1a; 48 | cursor: pointer; 49 | transition: border-color 0.25s; 50 | } 51 | button:hover { 52 | border-color: #646cff; 53 | } 54 | button:focus, 55 | button:focus-visible { 56 | outline: 4px auto -webkit-focus-ring-color; 57 | } 58 | 59 | .card { 60 | padding: 2em; 61 | } 62 | 63 | #app { 64 | max-width: 1280px; 65 | margin: 0 auto; 66 | padding: 2rem; 67 | text-align: center; 68 | } 69 | 70 | @media (prefers-color-scheme: light) { 71 | :root { 72 | color: #213547; 73 | background-color: #ffffff; 74 | } 75 | a:hover { 76 | color: #747bff; 77 | } 78 | button { 79 | background-color: #f9f9f9; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/client/src/style.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | :root { 4 | font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; 5 | line-height: 1.5; 6 | font-weight: 400; 7 | 8 | color-scheme: light dark; 9 | color: rgba(255, 255, 255, 0.87); 10 | background-color: #242424; 11 | 12 | font-synthesis: none; 13 | text-rendering: optimizeLegibility; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | a { 19 | font-weight: 500; 20 | color: #646cff; 21 | text-decoration: inherit; 22 | } 23 | a:hover { 24 | color: #535bf2; 25 | } 26 | 27 | body { 28 | margin: 0; 29 | display: flex; 30 | place-items: center; 31 | min-width: 320px; 32 | min-height: 100vh; 33 | } 34 | 35 | h1 { 36 | font-size: 3.2em; 37 | line-height: 1.1; 38 | } 39 | 40 | button { 41 | border-radius: 8px; 42 | border: 1px solid transparent; 43 | padding: 0.6em 1.2em; 44 | font-size: 1em; 45 | font-weight: 500; 46 | font-family: inherit; 47 | background-color: #1a1a1a; 48 | cursor: pointer; 49 | transition: border-color 0.25s; 50 | } 51 | button:hover { 52 | border-color: #646cff; 53 | } 54 | button:focus, 55 | button:focus-visible { 56 | outline: 4px auto -webkit-focus-ring-color; 57 | } 58 | 59 | .card { 60 | padding: 2em; 61 | } 62 | 63 | #app { 64 | max-width: 1280px; 65 | margin: 0 auto; 66 | padding: 2rem; 67 | text-align: center; 68 | } 69 | 70 | @media (prefers-color-scheme: light) { 71 | :root { 72 | color: #213547; 73 | background-color: #ffffff; 74 | } 75 | a:hover { 76 | color: #747bff; 77 | } 78 | button { 79 | background-color: #f9f9f9; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/.env.example: -------------------------------------------------------------------------------- 1 | # Server configuration 2 | PORT=5000 # Port number (common values: 3000, 5000, 8000, 8080) 3 | HOST=localhost # Host address (localhost, 0.0.0.0 to bind all interfaces, or specific IP/domain) 4 | NODE_ENV=development # Environment (development, production, test) 5 | CORS_ENABLED=true # Enable Cross-Origin Resource Sharing (true/false) 6 | RATE_LIMIT_ENABLED=false # Enable rate limiting to prevent abuse (true/false) 7 | ENABLE_RATE_LIMITING=false # Alternative rate limiting configuration (true/false) 8 | 9 | # Authentication 10 | JWT_SECRET=your_jwt_secret_key_here # Secret key for JWT tokens (use a strong random string, min 32 characters) 11 | JWT_EXPIRATION=7d # Token expiration time (format: 60, "2 days", "10h", "7d") 12 | 13 | # Database 14 | DB_NAME=your_database_name # MongoDB database name 15 | DB_CONNECTION_STRING=mongodb://localhost:27017/your_database_name # MongoDB connection URI (local or Atlas) 16 | # Atlas example: mongodb+srv://username:password@cluster0.mongodb.net/dbname 17 | 18 | # Redis 19 | REDIS_HOST=localhost # Redis server host (localhost or remote server) 20 | REDIS_PORT=6379 # Redis server port (default: 6379) 21 | REDIS_PASSWORD=your_redis_password # Redis authentication password (if enabled) 22 | 23 | # File uploads 24 | UPLOAD_DIR=uploads # Directory for permanent file uploads (relative or absolute path) 25 | TEMP_DIR=temp # Directory for temporary files (relative or absolute path) 26 | MAX_FILE_SIZE=10mb # Maximum file size limit (examples: 5mb, 10mb, 1gb) -------------------------------------------------------------------------------- /templates/mean+tailwind+auth/server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User.js"); 2 | const bcrypt = require("bcrypt"); 3 | const jwt = require("jsonwebtoken"); 4 | 5 | // Register 6 | const register = async (req, res) => { 7 | try { 8 | const { name, email, password } = req.body; 9 | 10 | // Check if user exists 11 | const existingUser = await User.findOne({ email }); 12 | if (existingUser) return res.status(400).json({ message: "User already exists" }); 13 | 14 | // Hash password 15 | const hashedPassword = await bcrypt.hash(password, 10); 16 | 17 | // Create user 18 | const user = await User.create({ name, email, password: hashedPassword }); 19 | 20 | // Generate JWT 21 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 22 | 23 | res.status(201).json({ 24 | token, 25 | user: { id: user._id, name: user.name, email: user.email } 26 | }); 27 | } catch (err) { 28 | res.status(500).json({ error: err.message }); 29 | } 30 | }; 31 | 32 | // Login 33 | const login = async (req, res) => { 34 | try { 35 | const { email, password } = req.body; 36 | 37 | // Find user 38 | const user = await User.findOne({ email }); 39 | if (!user) return res.status(400).json({ message: "Invalid credentials" }); 40 | 41 | // Check password 42 | const isMatch = await bcrypt.compare(password, user.password); 43 | if (!isMatch) return res.status(400).json({ message: "Invalid credentials" }); 44 | 45 | // Generate JWT 46 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 47 | 48 | res.json({ 49 | token, 50 | user: { id: user._id, name: user.name, email: user.email } 51 | }); 52 | } catch (err) { 53 | res.status(500).json({ error: err.message }); 54 | } 55 | }; 56 | 57 | // Export (CommonJS style) 58 | module.exports = { register, login }; 59 | -------------------------------------------------------------------------------- /templates/mern+tailwind+auth/server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User.js"); 2 | const bcrypt = require("bcrypt"); 3 | const jwt = require("jsonwebtoken"); 4 | 5 | // Register 6 | const register = async (req, res) => { 7 | try { 8 | const { name, email, password } = req.body; 9 | 10 | // Check if user exists 11 | const existingUser = await User.findOne({ email }); 12 | if (existingUser) return res.status(400).json({ message: "User already exists" }); 13 | 14 | // Hash password 15 | const hashedPassword = await bcrypt.hash(password, 10); 16 | 17 | // Create user 18 | const user = await User.create({ name, email, password: hashedPassword }); 19 | 20 | // Generate JWT 21 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 22 | 23 | res.status(201).json({ 24 | token, 25 | user: { id: user._id, name: user.name, email: user.email } 26 | }); 27 | } catch (err) { 28 | res.status(500).json({ error: err.message }); 29 | } 30 | }; 31 | 32 | // Login 33 | const login = async (req, res) => { 34 | try { 35 | const { email, password } = req.body; 36 | 37 | // Find user 38 | const user = await User.findOne({ email }); 39 | if (!user) return res.status(400).json({ message: "Invalid credentials" }); 40 | 41 | // Check password 42 | const isMatch = await bcrypt.compare(password, user.password); 43 | if (!isMatch) return res.status(400).json({ message: "Invalid credentials" }); 44 | 45 | // Generate JWT 46 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 47 | 48 | res.json({ 49 | token, 50 | user: { id: user._id, name: user.name, email: user.email } 51 | }); 52 | } catch (err) { 53 | res.status(500).json({ error: err.message }); 54 | } 55 | }; 56 | 57 | // Export (CommonJS style) 58 | module.exports = { register, login }; 59 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User.js"); 2 | const bcrypt = require("bcrypt"); 3 | const jwt = require("jsonwebtoken"); 4 | 5 | // Register 6 | const register = async (req, res) => { 7 | try { 8 | const { name, email, password } = req.body; 9 | 10 | // Check if user exists 11 | const existingUser = await User.findOne({ email }); 12 | if (existingUser) return res.status(400).json({ message: "User already exists" }); 13 | 14 | // Hash password 15 | const hashedPassword = await bcrypt.hash(password, 10); 16 | 17 | // Create user 18 | const user = await User.create({ name, email, password: hashedPassword }); 19 | 20 | // Generate JWT 21 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 22 | 23 | res.status(201).json({ 24 | token, 25 | user: { id: user._id, name: user.name, email: user.email } 26 | }); 27 | } catch (err) { 28 | res.status(500).json({ error: err.message }); 29 | } 30 | }; 31 | 32 | // Login 33 | const login = async (req, res) => { 34 | try { 35 | const { email, password } = req.body; 36 | 37 | // Find user 38 | const user = await User.findOne({ email }); 39 | if (!user) return res.status(400).json({ message: "Invalid credentials" }); 40 | 41 | // Check password 42 | const isMatch = await bcrypt.compare(password, user.password); 43 | if (!isMatch) return res.status(400).json({ message: "Invalid credentials" }); 44 | 45 | // Generate JWT 46 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 47 | 48 | res.json({ 49 | token, 50 | user: { id: user._id, name: user.name, email: user.email } 51 | }); 52 | } catch (err) { 53 | res.status(500).json({ error: err.message }); 54 | } 55 | }; 56 | 57 | // Export (CommonJS style) 58 | module.exports = { register, login }; 59 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/javascript/server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User.js"); 2 | const bcrypt = require("bcrypt"); 3 | const jwt = require("jsonwebtoken"); 4 | 5 | // Register 6 | const register = async (req, res) => { 7 | try { 8 | const { name, email, password } = req.body; 9 | 10 | // Check if user exists 11 | const existingUser = await User.findOne({ email }); 12 | if (existingUser) return res.status(400).json({ message: "User already exists" }); 13 | 14 | // Hash password 15 | const hashedPassword = await bcrypt.hash(password, 10); 16 | 17 | // Create user 18 | const user = await User.create({ name, email, password: hashedPassword }); 19 | 20 | // Generate JWT 21 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 22 | 23 | res.status(201).json({ 24 | token, 25 | user: { id: user._id, name: user.name, email: user.email } 26 | }); 27 | } catch (err) { 28 | res.status(500).json({ error: err.message }); 29 | } 30 | }; 31 | 32 | // Login 33 | const login = async (req, res) => { 34 | try { 35 | const { email, password } = req.body; 36 | 37 | // Find user 38 | const user = await User.findOne({ email }); 39 | if (!user) return res.status(400).json({ message: "Invalid credentials" }); 40 | 41 | // Check password 42 | const isMatch = await bcrypt.compare(password, user.password); 43 | if (!isMatch) return res.status(400).json({ message: "Invalid credentials" }); 44 | 45 | // Generate JWT 46 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 47 | 48 | res.json({ 49 | token, 50 | user: { id: user._id, name: user.name, email: user.email } 51 | }); 52 | } catch (err) { 53 | res.status(500).json({ error: err.message }); 54 | } 55 | }; 56 | 57 | // Export (CommonJS style) 58 | module.exports = { register, login }; 59 | -------------------------------------------------------------------------------- /templates/mevn+tailwind+auth/typescript/server/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User.js"); 2 | const bcrypt = require("bcrypt"); 3 | const jwt = require("jsonwebtoken"); 4 | 5 | // Register 6 | const register = async (req, res) => { 7 | try { 8 | const { name, email, password } = req.body; 9 | 10 | // Check if user exists 11 | const existingUser = await User.findOne({ email }); 12 | if (existingUser) return res.status(400).json({ message: "User already exists" }); 13 | 14 | // Hash password 15 | const hashedPassword = await bcrypt.hash(password, 10); 16 | 17 | // Create user 18 | const user = await User.create({ name, email, password: hashedPassword }); 19 | 20 | // Generate JWT 21 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 22 | 23 | res.status(201).json({ 24 | token, 25 | user: { id: user._id, name: user.name, email: user.email } 26 | }); 27 | } catch (err) { 28 | res.status(500).json({ error: err.message }); 29 | } 30 | }; 31 | 32 | // Login 33 | const login = async (req, res) => { 34 | try { 35 | const { email, password } = req.body; 36 | 37 | // Find user 38 | const user = await User.findOne({ email }); 39 | if (!user) return res.status(400).json({ message: "Invalid credentials" }); 40 | 41 | // Check password 42 | const isMatch = await bcrypt.compare(password, user.password); 43 | if (!isMatch) return res.status(400).json({ message: "Invalid credentials" }); 44 | 45 | // Generate JWT 46 | const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" }); 47 | 48 | res.json({ 49 | token, 50 | user: { id: user._id, name: user.name, email: user.email } 51 | }); 52 | } catch (err) { 53 | res.status(500).json({ error: err.message }); 54 | } 55 | }; 56 | 57 | // Export (CommonJS style) 58 | module.exports = { register, login }; 59 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "celtrix", 3 | "version": "2.3.4", 4 | "description": "CLI to create MERN apps quickly", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/celtrix-os/Celtrix.git" 8 | }, 9 | "type": "module", 10 | "main": "./bin/celtrix.js", 11 | "bin": { 12 | "celtrix": "./bin/celtrix.js" 13 | }, 14 | "files": [ 15 | "bin/", 16 | "index.js", 17 | "commands/", 18 | "utils/", 19 | "templates/" 20 | ], 21 | "keywords": [ 22 | "mern", 23 | "cli", 24 | "react", 25 | "express", 26 | "mongodb", 27 | "fullstack" 28 | ], 29 | "author": "Joe Celaster", 30 | "license": "ISC", 31 | "dependencies": { 32 | "@octokit/rest": "^22.0.0", 33 | "@pinecone-database/pinecone": "^6.1.2", 34 | "boxen": "^8.0.1", 35 | "chalk": "^5.6.0", 36 | "cross-spawn": "^7.0.6", 37 | "dotenv": "^17.2.3", 38 | "express": "^5.1.0", 39 | "figlet": "^1.8.2", 40 | "fs-extra": "^11.3.1", 41 | "gradient-string": "^3.0.0", 42 | "inquirer": "^12.9.4", 43 | "log-symbols": "^7.0.1", 44 | "node-fetch": "^3.3.2", 45 | "open": "^10.2.0", 46 | "ora": "^8.2.0" 47 | }, 48 | "scripts": { 49 | "release:patch": "npm version patch && npm publish --access public", 50 | "release:minor": "npm version minor && npm publish --access public", 51 | "release:major": "npm version major && npm publish --access public", 52 | "validate": "node scripts/validate-apis.js", 53 | "validate:pinecone": "node scripts/validate-apis.js pinecone", 54 | "validate:github": "node scripts/validate-apis.js github", 55 | "validate:gemini": "node scripts/validate-apis.js gemini", 56 | "populate-issues": "node scripts/populate-existing-issues.js", 57 | "cleanup-issue": "node scripts/cleanup-closed-issue.js", 58 | "cleanup-specific": "node scripts/cleanup-specific-issue.js", 59 | "cleanup-duplicates": "node scripts/cleanup-duplicates.js --force", 60 | "debug-db": "node scripts/debug-pinecone.js", 61 | "clear-all": "echo '⚠️ Use: npm run clear-all:force' && exit 1", 62 | "clear-all:force": "node scripts/clear-all-vectors.js --force", 63 | "check-duplicates": "node scripts/check-duplicates.js" 64 | }, 65 | "devDependencies": { 66 | "typescript": "^5.9.3" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/readme.md: -------------------------------------------------------------------------------- 1 | # Backend Template 2 | 3 | This is the backend template for the MERN stack application. It provides a RESTful API server with authentication, database connectivity, and file upload capabilities. 4 | 5 | ## Prerequisites 6 | 7 | - Node.js (v14.x or higher) 8 | - MongoDB (local or Atlas) 9 | - Redis (optional, for caching and rate limiting) 10 | 11 | ## Setup and Installation 12 | 13 | ### 1. Install Dependencies 14 | 15 | ```bash 16 | pnpm install 17 | ``` 18 | 19 | ### 2. Environment Configuration 20 | 21 | Copy the `.env.example` file to `.env` and update the environment variables: 22 | 23 | **Linux/Mac:** 24 | 25 | ```bash 26 | cp .env.example .env 27 | ``` 28 | 29 | **Windows (Command Prompt):** 30 | 31 | ```bash 32 | copy .env.example .env 33 | ``` 34 | 35 | **Windows (PowerShell):** 36 | 37 | ```bash 38 | Copy-Item .env.example .env 39 | ``` 40 | 41 | ### 3. Configure Environment Variables 42 | 43 | Update the `.env` file with your configuration: 44 | 45 | ```env 46 | # Server configuration 47 | PORT=5000 # Port the server will run on 48 | HOST=localhost # Host address 49 | NODE_ENV=development # Environment (development/production/test) 50 | CORS_ENABLED=true # Enable/disable CORS 51 | RATE_LIMIT_ENABLED=false # Enable/disable rate limiting 52 | 53 | # Authentication 54 | JWT_SECRET=your_jwt_secret_key_here # Secret for JWT tokens 55 | JWT_EXPIRATION=7d # Token expiration time 56 | 57 | # Database 58 | DB_NAME=your_database_name 59 | DB_CONNECTION_STRING=mongodb://localhost:27017/your_database_name 60 | 61 | # Redis (if enabled) 62 | REDIS_HOST=localhost 63 | REDIS_PORT=6379 64 | REDIS_PASSWORD=your_redis_password 65 | 66 | # File uploads 67 | UPLOAD_DIR=uploads 68 | TEMP_DIR=temp 69 | MAX_FILE_SIZE=10mb # Maximum file upload size 70 | ``` 71 | 72 | ## Running the Server 73 | 74 | ### Development Mode 75 | 76 | ```bash 77 | npm run dev 78 | ``` 79 | 80 | ### Production Mode 81 | 82 | ```bash 83 | npm run build 84 | npm start 85 | ``` 86 | 87 | ## API Documentation 88 | 89 | API documentation is available at `/api-docs` when the server is running. 90 | 91 | ## Available Scripts 92 | 93 | - `npm run dev` - Start development server with hot reload 94 | - `npm run build` - Build for production 95 | - `npm start` - Start production server 96 | - `npm test` - Run tests 97 | - `npm run lint` - Run linting checks 98 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: 13 | 14 | ```js 15 | export default tseslint.config([ 16 | globalIgnores(['dist']), 17 | { 18 | files: ['**/*.{ts,tsx}'], 19 | extends: [ 20 | // Other configs... 21 | 22 | // Remove tseslint.configs.recommended and replace with this 23 | ...tseslint.configs.recommendedTypeChecked, 24 | // Alternatively, use this for stricter rules 25 | ...tseslint.configs.strictTypeChecked, 26 | // Optionally, add this for stylistic rules 27 | ...tseslint.configs.stylisticTypeChecked, 28 | 29 | // Other configs... 30 | ], 31 | languageOptions: { 32 | parserOptions: { 33 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 34 | tsconfigRootDir: import.meta.dirname, 35 | }, 36 | // other options... 37 | }, 38 | }, 39 | ]) 40 | ``` 41 | 42 | You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: 43 | 44 | ```js 45 | // eslint.config.js 46 | import reactX from 'eslint-plugin-react-x' 47 | import reactDom from 'eslint-plugin-react-dom' 48 | 49 | export default tseslint.config([ 50 | globalIgnores(['dist']), 51 | { 52 | files: ['**/*.{ts,tsx}'], 53 | extends: [ 54 | // Other configs... 55 | // Enable lint rules for React 56 | reactX.configs['recommended-typescript'], 57 | // Enable lint rules for React DOM 58 | reactDom.configs.recommended, 59 | ], 60 | languageOptions: { 61 | parserOptions: { 62 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 63 | tsconfigRootDir: import.meta.dirname, 64 | }, 65 | // other options... 66 | }, 67 | }, 68 | ]) 69 | ``` 70 | -------------------------------------------------------------------------------- /FAQ.md: -------------------------------------------------------------------------------- 1 | ## ❓ Frequently Asked Questions (FAQ) 2 | 3 | **Q1: What makes Celtrix stand out from other project scaffolding tools?** 4 | A1: Celtrix provides ready-to-use templates, supports multiple popular stacks, and follows modern best practices, allowing you to start projects quickly without setting up everything manually. 5 | 6 | **Q2: How do I add a new stack or template to Celtrix?** 7 | A2: You can create a new template in the `templates/` folder following the existing folder structure. Test it using the CLI and then submit a Pull Request to contribute. 8 | 9 | **Q3: Are projects created with Celtrix ready for production?** 10 | A3: Celtrix projects give you a strong foundation for development. Some adjustments may be needed for production depending on your specific project requirements. 11 | 12 | **Q4: Which stacks are currently available in Celtrix?** 13 | A4: Celtrix currently supports MERN, MEAN, T3, Angular+Tailwind, and several other popular stacks. Contributors can add more stacks. 14 | 15 | **Q5: Do I need to install anything globally to use Celtrix?** 16 | A5: No, you don’t need global installations. Simply run `npx celtrix my-awesome-app` and follow the interactive prompts to start a project. 17 | 18 | **Q6: Can I customize the generated templates?** 19 | A6: Absolutely! You can modify components, styles, API setups, and configurations to match your project’s requirements. 20 | 21 | **Q7: How can I report bugs or request new features?** 22 | A7: Open a GitHub Issue in the Celtrix repository. Provide clear steps, screenshots, and a description to help maintainers understand and address your request. 23 | 24 | **Q8: Does Celtrix support TypeScript projects?** 25 | A8: Yes, most templates offer optional TypeScript support. You can choose TypeScript when setting up a new project. 26 | 27 | **Q9: Can I use Celtrix for commercial projects?** 28 | A9: Yes! Celtrix is open-source under the ISC license, so you can use it for personal or commercial projects following the license terms. 29 | 30 | **Q10: How can I improve or update existing templates?** 31 | A10: Fork the repository, make your changes in a separate branch, test them, and submit a Pull Request. Ensure your updates follow the coding guidelines. 32 | 33 | **Q11: What prerequisites do I need to use Celtrix?** 34 | A11: You only need Node.js and npm installed. Celtrix will handle other dependencies automatically during project setup. 35 | 36 | **Q12: Where can I get support or join the Celtrix community?** 37 | A12: You can ask questions via GitHub Discussions or join the community chat if available. Always stay respectful and constructive while engaging. 38 | 39 | --- 40 | -------------------------------------------------------------------------------- /templates/mern/Ts-Backend/src/utils/SendResponse.utils.ts: -------------------------------------------------------------------------------- 1 | import { Response } from 'express'; 2 | 3 | export type ErrorType = { 4 | // Basic error info 5 | message: string; 6 | name?: string; 7 | 8 | // HTTP related 9 | status?: number; 10 | statusCode?: number; 11 | 12 | // Application specific 13 | code?: string | number; 14 | 15 | // Error chaining 16 | cause?: Error | ErrorType | unknown; 17 | 18 | // Debugging 19 | stack?: string; 20 | 21 | // For validation errors 22 | errors?: Array<{field?: string; message: string}> | Record; 23 | 24 | // Allow for any additional properties 25 | [key: string]: unknown; 26 | } 27 | 28 | export class AppError extends Error implements Omit { 29 | name: string = 'AppError'; 30 | status: number; 31 | code?: string | number; 32 | errors?: Array<{field?: string; message: string}> | Record; 33 | cause?: Error | ErrorType | unknown; 34 | [key: string]: unknown; 35 | 36 | constructor(message: string, options?: Partial) { 37 | super(message); 38 | 39 | Object.assign(this, options); 40 | this.status = options?.status || options?.statusCode || 500; 41 | 42 | // Capture stack trace 43 | if (Error.captureStackTrace) { 44 | Error.captureStackTrace(this, this.constructor); 45 | } 46 | } 47 | 48 | toJSON() { 49 | const errorObject: ErrorType = { 50 | message: this.message, 51 | name: this.name, 52 | }; 53 | 54 | // Add all other properties 55 | Object.entries(this).forEach(([key, value]) => { 56 | if (key !== 'message' && key !== 'name') { 57 | errorObject[key] = value; 58 | } 59 | }); 60 | 61 | return errorObject; 62 | } 63 | } 64 | 65 | export class SendResponse { 66 | static success(res: Response, message: string, data: unknown, status = 200) { 67 | return res.status(status).json({ 68 | success: true, 69 | message, 70 | data, 71 | }); 72 | } 73 | 74 | static error(res: Response, messageOrError: string | ErrorType | Error, status = 500) { 75 | // Handle when first argument is an error object 76 | if (typeof messageOrError !== 'string') { 77 | const error = messageOrError; 78 | const statusCode = 79 | (error as ErrorType).status || 80 | (error as ErrorType).statusCode || 81 | status; 82 | 83 | return res.status(statusCode).json({ 84 | success: false, 85 | message: error.message || 'An error occurred', 86 | error: error instanceof AppError ? error.toJSON() : error, 87 | }); 88 | } 89 | 90 | // Handle string message 91 | return res.status(status).json({ 92 | success: false, 93 | message: messageOrError, 94 | }); 95 | } 96 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## About Celtrix OS 4 | 5 | Celtrix OS simplifies web app setup—getting developers from zero to running apps in seconds, not hours. Our motto is clear: No Setup, No Sh*t. Based in India, we strive to build an efficient, friendly, and inclusive community that reflects the same clarity and speed our product delivers. 6 | 7 | 8 | - Contact: celtrix.org@gmail.com 9 | 10 | ## Our Pledge 11 | 12 | We as contributors and maintainers of the Celtrix OS project pledge to make participation in our community a respectful, harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 13 | 14 | We are committed to fostering a friendly, safe, and inclusive environment for all. 15 | 16 | ## Our Standards 17 | 18 | Examples of behavior that contributes to a positive environment include: 19 | 20 | - Using welcoming and inclusive language 21 | - Respecting differing viewpoints and experiences 22 | - Accepting constructive criticism gracefully 23 | - Focusing on what is best for the community 24 | - Showing empathy toward other community members 25 | 26 | Examples of unacceptable behavior include: 27 | 28 | - Harassment, intimidation, or discrimination 29 | - Trolling, insulting or derogatory comments, and personal attacks 30 | - Publishing others’ private information without explicit permission 31 | - Disruptive behavior in discussions or pull requests 32 | 33 | ## Our Responsibilities 34 | 35 | Project maintainers are responsible for clarifying standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 36 | 37 | Maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that do not align with this Code of Conduct. 38 | 39 | ## Scope 40 | 41 | This Code of Conduct applies to all spaces associated with the Celtrix OS project, including GitHub issues, pull requests, discussions, and other communication platforms. It also governs behavior when individuals represent the project publicly or professionally. 42 | 43 | We expect the same respect, clarity, and professionalism in community interactions as we deliver in our product: quick, reliable, and respectful. 44 | 45 | ## Enforcement 46 | 47 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the maintainers at **celtrix.org@gmail.com**. All complaints will be reviewed and investigated promptly and fairly. 48 | 49 | ## Attribution 50 | 51 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1. 52 | -------------------------------------------------------------------------------- /.github/workflows/api-validation.yml: -------------------------------------------------------------------------------- 1 | name: API Validation 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | validation_scope: 7 | description: 'Which APIs to validate' 8 | required: true 9 | default: 'all-apis' 10 | type: choice 11 | options: 12 | - 'all-apis' 13 | - 'pinecone-only' 14 | - 'github-only' 15 | - 'gemini-only' 16 | 17 | permissions: 18 | issues: read 19 | contents: read 20 | 21 | jobs: 22 | validate-apis: 23 | runs-on: ubuntu-latest 24 | 25 | steps: 26 | - name: Checkout repository 27 | uses: actions/checkout@v4 28 | 29 | - name: Setup Node.js 30 | uses: actions/setup-node@v4 31 | with: 32 | node-version: 20 33 | 34 | - name: Install dependencies 35 | run: npm install 36 | 37 | - name: Validate All APIs 38 | if: ${{ github.event.inputs.validation_scope == 'all-apis' }} 39 | env: 40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 42 | GITHUB_REPOSITORY: ${{ github.repository }} 43 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 44 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 45 | run: | 46 | echo "🔍 Validating all API connections..." 47 | node scripts/validate-apis.js 48 | 49 | - name: Validate Pinecone Only 50 | if: ${{ github.event.inputs.validation_scope == 'pinecone-only' }} 51 | env: 52 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 53 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 54 | run: | 55 | echo "🔍 Validating Pinecone database connection..." 56 | node scripts/validate-apis.js pinecone 57 | 58 | - name: Validate GitHub Only 59 | if: ${{ github.event.inputs.validation_scope == 'github-only' }} 60 | env: 61 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 62 | GITHUB_REPOSITORY: ${{ github.repository }} 63 | run: | 64 | echo "🔍 Validating GitHub API connection..." 65 | node scripts/validate-apis.js github 66 | 67 | - name: Validate Gemini Only 68 | if: ${{ github.event.inputs.validation_scope == 'gemini-only' }} 69 | env: 70 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 71 | run: | 72 | echo "🔍 Validating Gemini API connection..." 73 | node scripts/validate-apis.js gemini 74 | 75 | - name: Validation Summary 76 | if: ${{ always() }} 77 | run: | 78 | echo "### 🔍 API Validation Summary" >> $GITHUB_STEP_SUMMARY 79 | echo "- **Validation Scope:** ${{ github.event.inputs.validation_scope }}" >> $GITHUB_STEP_SUMMARY 80 | echo "- **Repository:** ${{ github.repository }}" >> $GITHUB_STEP_SUMMARY 81 | echo "- **Triggered by:** @${{ github.actor }}" >> $GITHUB_STEP_SUMMARY 82 | echo "- **Timestamp:** $(date -u)" >> $GITHUB_STEP_SUMMARY 83 | echo "" >> $GITHUB_STEP_SUMMARY 84 | echo "✅ Run this before database operations to ensure API connectivity." >> $GITHUB_STEP_SUMMARY 85 | -------------------------------------------------------------------------------- /scripts/debug-pinecone.js: -------------------------------------------------------------------------------- 1 | import { Pinecone } from "@pinecone-database/pinecone"; 2 | import dotenv from "dotenv"; 3 | 4 | // Load environment variables 5 | dotenv.config(); 6 | 7 | const pinecone = new Pinecone({ 8 | apiKey: process.env.PINECONE_API_KEY, 9 | }); 10 | 11 | const indexName = process.env.PINECONE_INDEX; 12 | 13 | async function debugPinecone() { 14 | console.log("=== Pinecone Debug Information ==="); 15 | console.log(`Index: ${indexName}`); 16 | 17 | try { 18 | const index = pinecone.Index(indexName); 19 | 20 | // Get index stats 21 | console.log("\n1. Index Statistics:"); 22 | const stats = await index.describeIndexStats(); 23 | console.log("Full stats object:", JSON.stringify(stats, null, 2)); 24 | 25 | // Try to query some vectors 26 | console.log("\n2. Sample Query (first 10 vectors):"); 27 | try { 28 | const queryResult = await index.query({ 29 | vector: Array(1024).fill(0.1), 30 | topK: 10, 31 | includeMetadata: true, 32 | includeValues: false 33 | }); 34 | 35 | console.log(`Found ${queryResult.matches?.length || 0} vectors`); 36 | if (queryResult.matches && queryResult.matches.length > 0) { 37 | queryResult.matches.forEach((match, i) => { 38 | console.log(` ${i + 1}. ID: ${match.id}, Score: ${match.score}`); 39 | if (match.metadata) { 40 | console.log(` Metadata:`, match.metadata); 41 | } 42 | }); 43 | } 44 | } catch (queryError) { 45 | console.error("Query failed:", queryError.message); 46 | } 47 | 48 | // Try specific fetch for known IDs 49 | console.log("\n3. Testing specific ID fetch:"); 50 | const testIds = ['issue-1', 'issue-3', 'issue-4', 'issue-5', 'issue-6', 'issue-7', 'issue-8']; 51 | 52 | try { 53 | const fetchResult = await index.fetch(testIds); 54 | console.log(`Fetch result keys: ${Object.keys(fetchResult.vectors || {}).join(', ')}`); 55 | 56 | if (fetchResult.vectors) { 57 | Object.entries(fetchResult.vectors).forEach(([id, vector]) => { 58 | console.log(` Found: ${id}`); 59 | if (vector.metadata) { 60 | console.log(` Issue #: ${vector.metadata.issue_number}`); 61 | console.log(` Title: ${vector.metadata.title?.substring(0, 50)}...`); 62 | } 63 | }); 64 | } 65 | } catch (fetchError) { 66 | console.error("Fetch failed:", fetchError.message); 67 | } 68 | 69 | // Try with different ID patterns (in case they have timestamps) 70 | console.log("\n4. Checking for timestamped IDs:"); 71 | try { 72 | const allQuery = await index.query({ 73 | vector: Array(1024).fill(0.1), 74 | topK: 100, 75 | includeMetadata: true, 76 | includeValues: false 77 | }); 78 | 79 | if (allQuery.matches && allQuery.matches.length > 0) { 80 | console.log("All vector IDs found:"); 81 | allQuery.matches.forEach(match => { 82 | console.log(` - ${match.id} (issue #${match.metadata?.issue_number || 'unknown'})`); 83 | }); 84 | } else { 85 | console.log("No vectors found in query"); 86 | } 87 | } catch (allQueryError) { 88 | console.error("All query failed:", allQueryError.message); 89 | } 90 | 91 | } catch (error) { 92 | console.error("Debug failed:", error); 93 | } 94 | } 95 | 96 | debugPinecone().catch(console.error); -------------------------------------------------------------------------------- /.github/workflows/duplicate-issue.yml: -------------------------------------------------------------------------------- 1 | name: Duplicate Issue Management 2 | 3 | on: 4 | issues: 5 | types: [opened, edited, closed, reopened] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: 'Issue number to manually check for duplicates' 10 | required: true 11 | type: number 12 | 13 | permissions: 14 | issues: write 15 | 16 | jobs: 17 | check-duplicates: 18 | if: ${{ github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'reopened' || github.event_name == 'workflow_dispatch' }} 19 | runs-on: ubuntu-latest 20 | env: 21 | SIMILARITY_THRESHOLD: 0.7 22 | 23 | steps: 24 | - name: Checkout repository 25 | uses: actions/checkout@v4 26 | 27 | - name: Setup Node.js 28 | uses: actions/setup-node@v4 29 | with: 30 | node-version: 20 31 | 32 | - name: Install dependencies 33 | run: npm install 34 | 35 | - name: Set issue number 36 | id: issue-number 37 | run: | 38 | if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then 39 | echo "ISSUE_NUMBER=${{ github.event.inputs.issue_number }}" >> $GITHUB_ENV 40 | echo "Manual check for issue #${{ github.event.inputs.issue_number }}" 41 | else 42 | echo "ISSUE_NUMBER=${{ github.event.issue.number }}" >> $GITHUB_ENV 43 | echo "Automatic check for issue #${{ github.event.issue.number }}" 44 | fi 45 | 46 | - name: Run duplicate check 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 50 | GITHUB_REPOSITORY: ${{ github.repository }} 51 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 52 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 53 | run: | 54 | echo "🔍 Checking issue #$ISSUE_NUMBER for duplicates..." 55 | echo "📊 Similarity threshold: $SIMILARITY_THRESHOLD" 56 | node scripts/check-duplicates.js 57 | continue-on-error: true 58 | 59 | - name: Handle check failure 60 | if: ${{ failure() }} 61 | run: | 62 | echo "⚠️ Duplicate check failed, but continuing workflow" 63 | echo "This might be due to API limits or temporary issues" 64 | echo "Issue #$ISSUE_NUMBER will be processed normally" 65 | 66 | cleanup-closed-issue: 67 | if: ${{ github.event.action == 'closed' }} 68 | runs-on: ubuntu-latest 69 | 70 | steps: 71 | - name: Checkout repository 72 | uses: actions/checkout@v3 73 | 74 | - name: Setup Node.js 75 | uses: actions/setup-node@v3 76 | with: 77 | node-version: 20 78 | 79 | - name: Install dependencies 80 | run: npm install 81 | 82 | - name: Remove closed issue from vector database 83 | env: 84 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 85 | ISSUE_NUMBER: ${{ github.event.issue.number }} 86 | GITHUB_REPOSITORY: ${{ github.repository }} 87 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 88 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 89 | run: | 90 | echo "🧹 Removing closed issue #$ISSUE_NUMBER from database..." 91 | node scripts/cleanup-closed-issue.js 92 | continue-on-error: true 93 | 94 | - name: Handle cleanup failure 95 | if: ${{ failure() }} 96 | run: | 97 | echo "⚠️ Cleanup of closed issue failed, but this is non-critical" 98 | echo "Issue #$ISSUE_NUMBER may remain in the vector database" 99 | echo "You can manually clean it up later using the database management workflow" 100 | -------------------------------------------------------------------------------- /templates/hono/javascript/client/src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/hono/typescript/client/src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

3 | lop 4 |

5 | Celtrix is a modern web-app scaffolder where you can Setup web apps in seconds, not hours, with your preferred stack. 6 |

7 |
8 |
9 | 10 | [![npm version](https://img.shields.io/npm/v/celtrix.svg)](https://www.npmjs.com/package/celtrix) 11 | ![npm](https://img.shields.io/npm/dt/celtrix) 12 | [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC) 13 | [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289da?logo=discord&logoColor=white)](https://discord.gg/GkDcAErQbD) 14 | 15 | 16 |
17 | 18 | 19 | # Features 20 | 21 | 22 | ### **Multiple Stack Options** 23 | - Run ```npx celtrix``` to instantly create projects with your favorite stack. 24 | - Choose from **MERN, MEAN, MEVN, Next.js, or Hono setups**. 25 | - Choose your own **preferred language**. 26 | - Includes ready-made variants like Tailwind + Auth or Firebase integration. 27 | - Simple, colorful, and interactive terminal experience. 28 | - Built for developers who want fast, clean, and modern project scaffolding. 29 | 30 | 31 | --- 32 | 33 | ### **Ready-to-Go Setup** 34 | - **ESLint** configuration included 35 | - **Sample components** and boilerplate code 36 | - **API setup** with best practices 37 | - **Automatic dependency installation** 38 | - **Modern development tools** pre-configured 39 | 40 | --- 41 | 42 | # Quick Start 43 | 44 | No global installation needed! Get started instantly: 45 | 46 | ```bash 47 | npx celtrix my-app 48 | ``` 49 | 50 | That's it! Follow the interactive prompts to customize your project. 51 | 52 | --- 53 | 54 | # FAQ 55 | 56 | You can now find the full list of FAQs here: [FAQ.md](./FAQ.md) 57 | 58 | --- 59 | 60 | # What You Get 61 | 62 | - **Production-ready** project structure 63 | - **Modern tooling** and best practices 64 | - **Responsive** starter templates 65 | - **Clean code** architecture 66 | - **Documentation** and examples 67 | 68 | --- 69 | 70 | # Analytics 71 | 72 |
73 | 74 | ![Alt](https://repobeats.axiom.co/api/embed/a7eb78008e8600eecc1e03ef4a546cf9104411dc.svg "Repobeats analytics image") 75 | 76 |
77 | 78 | --- 79 | 80 | # Star History 81 | 82 |
83 |

📈 Watch our journey grow!

84 |

See how our community has grown over time

85 |
86 | 87 | 88 | 89 | 90 | 91 | Star History Chart 92 | 93 | 94 | 95 |
96 |

📊 View interactive chart

97 |
98 | 99 | --- 100 | 101 | # Contributing 102 | 103 | We love contributions! Please feel free to: 104 | 105 | - Report bugs 106 | - Suggest new features or ideas 107 | - Submit pull requests 108 | - Star this repository 109 | 110 | Check out [CONTRIBUTING](https://github.com/celtrix-os/Celtrix/blob/main/CONTRIBUTING.md) to see how to contribute to Celtrix. 111 | 112 | --- 113 | # Our Contributors 114 | 115 | Thanks goes to these wonderful people: 116 | 117 |
118 | 119 |
120 | 121 | 122 | 123 |
124 | 125 |
126 | 127 | 128 |
129 | 130 |

Made with ❤️ by Celtrix Team

131 | 132 |

⭐ Star us on GitHub — it motivates us a lot!

133 | 134 |
135 | 136 | -------------------------------------------------------------------------------- /.github/workflows/database-operations.yml: -------------------------------------------------------------------------------- 1 | name: Database Operations 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | action: 7 | description: 'Database operation to perform' 8 | required: true 9 | default: 'populate-issues' 10 | type: choice 11 | options: 12 | - 'populate-issues' 13 | - 'cleanup-duplicates' 14 | - 'debug-database' 15 | - 'clear-all-vectors' 16 | force: 17 | description: 'Force action (required for destructive operations)' 18 | required: false 19 | default: false 20 | type: boolean 21 | 22 | permissions: 23 | issues: read 24 | contents: read 25 | 26 | jobs: 27 | database-operation: 28 | runs-on: ubuntu-latest 29 | 30 | steps: 31 | - name: Checkout repository 32 | uses: actions/checkout@v4 33 | 34 | - name: Setup Node.js 35 | uses: actions/setup-node@v4 36 | with: 37 | node-version: 20 38 | 39 | - name: Install dependencies 40 | run: npm install 41 | 42 | - name: Populate Issues to Database 43 | if: ${{ github.event.inputs.action == 'populate-issues' }} 44 | env: 45 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 46 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 47 | GITHUB_REPOSITORY: ${{ github.repository }} 48 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 49 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 50 | run: | 51 | echo "🚀 Populating existing issues to database..." 52 | echo "This will skip issues that already exist in the database." 53 | node scripts/populate-existing-issues.js 54 | 55 | - name: Cleanup Duplicate Vectors 56 | if: ${{ github.event.inputs.action == 'cleanup-duplicates' }} 57 | env: 58 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 59 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 60 | run: | 61 | echo "🧹 Cleaning up duplicate vectors..." 62 | if [ "${{ github.event.inputs.force }}" = "true" ]; then 63 | node scripts/cleanup-duplicates.js --force 64 | else 65 | echo "❌ Cleanup requires force flag to be enabled for safety!" 66 | echo "Please re-run the workflow with 'Force action' checked." 67 | exit 1 68 | fi 69 | 70 | - name: Debug Database 71 | if: ${{ github.event.inputs.action == 'debug-database' }} 72 | env: 73 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 74 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 75 | run: | 76 | echo "🔍 Running database diagnostics..." 77 | node scripts/debug-pinecone.js 78 | 79 | - name: Clear All Vectors 80 | if: ${{ github.event.inputs.action == 'clear-all-vectors' }} 81 | env: 82 | PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} 83 | PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }} 84 | run: | 85 | echo "🚨 DANGER: Clearing all vectors from database..." 86 | if [ "${{ github.event.inputs.force }}" = "true" ]; then 87 | echo "⚠️ This will delete ALL vectors in the database!" 88 | node scripts/clear-all-vectors.js --force 89 | else 90 | echo "❌ Clear all requires force flag to be enabled for safety!" 91 | echo "Please re-run the workflow with 'Force action' checked." 92 | exit 1 93 | fi 94 | 95 | - name: Operation Summary 96 | if: always() 97 | run: | 98 | echo "### 🗄️ Database Operation Summary" >> $GITHUB_STEP_SUMMARY 99 | echo "- **Operation:** ${{ github.event.inputs.action }}" >> $GITHUB_STEP_SUMMARY 100 | echo "- **Force Flag:** ${{ github.event.inputs.force }}" >> $GITHUB_STEP_SUMMARY 101 | echo "- **Repository:** ${{ github.repository }}" >> $GITHUB_STEP_SUMMARY 102 | echo "- **Timestamp:** $(date -u)" >> $GITHUB_STEP_SUMMARY 103 | echo "" >> $GITHUB_STEP_SUMMARY 104 | echo "🔗 Use 'API Validation' workflow to test connections before database operations." >> $GITHUB_STEP_SUMMARY 105 | -------------------------------------------------------------------------------- /scripts/cleanup-specific-issue.js: -------------------------------------------------------------------------------- 1 | import { Pinecone } from "@pinecone-database/pinecone"; 2 | import dotenv from "dotenv"; 3 | 4 | // Load environment variables 5 | dotenv.config(); 6 | 7 | const pinecone = new Pinecone({ 8 | apiKey: process.env.PINECONE_API_KEY, 9 | }); 10 | 11 | const indexName = process.env.PINECONE_INDEX; 12 | const ISSUE_TO_DELETE = process.env.ISSUE_NUMBER || process.argv[2]; 13 | 14 | async function deleteIssueVectors() { 15 | console.log(`\n=== Deleting vectors for Issue #${ISSUE_TO_DELETE} ===`); 16 | console.log(`Pinecone Index: ${indexName}`); 17 | 18 | if (!ISSUE_TO_DELETE) { 19 | console.error("❌ Please provide an issue number:"); 20 | console.error(" Usage: ISSUE_NUMBER=6 node scripts/cleanup-specific-issue.js"); 21 | console.error(" Or: node scripts/cleanup-specific-issue.js 6"); 22 | process.exit(1); 23 | } 24 | 25 | try { 26 | const index = pinecone.Index(indexName); 27 | console.log("✅ Connected to Pinecone index"); 28 | 29 | // Find all vectors for this issue 30 | console.log(`🔍 Searching for vectors related to issue #${ISSUE_TO_DELETE}...`); 31 | 32 | const vectorsToDelete = []; 33 | 34 | try { 35 | // First, try using metadata filter 36 | const queryResponse = await index.query({ 37 | vector: Array(1024).fill(0.1), // dummy vector for metadata filtering 38 | topK: 100, 39 | includeValues: false, 40 | includeMetadata: true, 41 | filter: { 42 | issue_number: parseInt(ISSUE_TO_DELETE) 43 | } 44 | }); 45 | 46 | if (queryResponse.matches && queryResponse.matches.length > 0) { 47 | for (const match of queryResponse.matches) { 48 | vectorsToDelete.push(match.id); 49 | console.log(` 📌 Found vector via filter: ${match.id}`); 50 | console.log(` Metadata:`, JSON.stringify(match.metadata, null, 2)); 51 | } 52 | } else { 53 | console.log(" 🔄 Filter query returned no results, trying list approach..."); 54 | 55 | // Fallback: List all vectors and filter 56 | let paginationToken = null; 57 | 58 | do { 59 | const listOptions = { limit: 100 }; 60 | if (paginationToken) { 61 | listOptions.paginationToken = paginationToken; 62 | } 63 | 64 | const listResponse = await index.listPaginated(listOptions); 65 | 66 | if (listResponse.vectors) { 67 | for (const vector of listResponse.vectors) { 68 | if (vector.metadata?.issue_number === parseInt(ISSUE_TO_DELETE)) { 69 | vectorsToDelete.push(vector.id); 70 | console.log(` 📌 Found vector via list: ${vector.id}`); 71 | console.log(` Metadata:`, JSON.stringify(vector.metadata, null, 2)); 72 | } 73 | } 74 | } 75 | 76 | paginationToken = listResponse.pagination?.next; 77 | } while (paginationToken); 78 | } 79 | } catch (searchError) { 80 | console.error("❌ Error searching for vectors:", searchError.message); 81 | throw searchError; 82 | } 83 | 84 | console.log(`\nFound ${vectorsToDelete.length} vector(s) to delete for Issue #${ISSUE_TO_DELETE}`); 85 | 86 | if (vectorsToDelete.length === 0) { 87 | console.log(`ℹ️ No vectors found for Issue #${ISSUE_TO_DELETE}. Nothing to delete.`); 88 | return; 89 | } 90 | 91 | // Show what we're about to delete 92 | console.log(`\n🗑️ About to delete the following vectors:`); 93 | vectorsToDelete.forEach((id, index) => { 94 | console.log(` ${index + 1}. ${id}`); 95 | }); 96 | 97 | // Confirm deletion 98 | console.log(`\n⚠️ This action cannot be undone!`); 99 | 100 | // Delete the vectors 101 | console.log(`\n🗑️ Deleting ${vectorsToDelete.length} vector(s)...`); 102 | 103 | try { 104 | await index.deleteMany(vectorsToDelete); 105 | console.log(`✅ Successfully deleted ${vectorsToDelete.length} vector(s) for Issue #${ISSUE_TO_DELETE}`); 106 | } catch (deleteError) { 107 | console.error(`❌ Error deleting vectors:`, deleteError.message); 108 | throw deleteError; 109 | } 110 | 111 | console.log(`\n=== Cleanup Summary ===`); 112 | console.log(`📊 Issue #${ISSUE_TO_DELETE} vectors deleted: ${vectorsToDelete.length}`); 113 | console.log(`✅ Database cleanup completed successfully`); 114 | console.log(`\n🎯 You can now edit Issue #${ISSUE_TO_DELETE} to test the update functionality!`); 115 | 116 | } catch (error) { 117 | console.error("❌ Error during cleanup:", error); 118 | process.exit(1); 119 | } 120 | } 121 | 122 | // Handle command line arguments 123 | const args = process.argv.slice(2); 124 | if (args.includes('--help') || args.includes('-h')) { 125 | console.log(` 126 | 📖 Usage: 127 | ISSUE_NUMBER=6 node scripts/cleanup-specific-issue.js 128 | node scripts/cleanup-specific-issue.js 6 129 | 130 | 🔧 Required Environment Variables: 131 | - PINECONE_API_KEY: Pinecone API key 132 | - PINECONE_INDEX: Pinecone index name 133 | 134 | 📝 This script will: 135 | 1. Find all vectors in Pinecone related to the specified issue number 136 | 2. Delete those vectors from the Pinecone index 137 | 3. Show a summary of what was deleted 138 | 139 | ⚠️ Note: This action cannot be undone! Use carefully. 140 | `); 141 | process.exit(0); 142 | } 143 | 144 | // Run the cleanup script 145 | deleteIssueVectors().catch(error => { 146 | console.error("💥 Cleanup script failed:", error); 147 | process.exit(1); 148 | }); -------------------------------------------------------------------------------- /WORKFLOWS.md: -------------------------------------------------------------------------------- 1 | # 🤖 Database Management Workflows 2 | 3 | This repository includes several GitHub Actions workflows for managing your Pinecone vector database and duplicate detection system. 4 | 5 | ## 📋 Available Workflows 6 | 7 | ### 1. �️ Database Operations (Manual) 8 | **File:** `.github/workflows/database-operations.yml` 9 | 10 | Pure database management operations - no validation mixed in. 11 | 12 | **Operations Available:** 13 | - **Populate Issues** - Add existing GitHub issues to Pinecone database (skips duplicates) 14 | - **Cleanup Duplicates** - Remove duplicate vectors (requires force flag) 15 | - **Debug Database** - View database contents and statistics 16 | - **Clear All Vectors** - ⚠️ **DANGER:** Delete all vectors (requires force flag) 17 | 18 | **How to use:** 19 | 1. Go to **Actions** tab in your repository 20 | 2. Select **"Database Operations"** 21 | 3. Click **"Run workflow"** 22 | 4. Choose your operation and enable force flag if needed 23 | 5. Click **"Run workflow"** 24 | 25 | ### 2. 🔍 API Validation (Manual) 26 | **File:** `.github/workflows/api-validation.yml` 27 | 28 | Pure API connection testing - run before database operations. 29 | 30 | **Validation Scopes:** 31 | - **All APIs** - Test all connections (Pinecone, GitHub, Gemini) 32 | - **Pinecone Only** - Test only Pinecone database connection 33 | - **GitHub Only** - Test only GitHub API connection 34 | - **Gemini Only** - Test only Gemini AI API connection 35 | 36 | **How to use:** 37 | 1. Go to **Actions** tab in your repository 38 | 2. Select **"API Validation"** 39 | 3. Click **"Run workflow"** 40 | 4. Choose validation scope 41 | 5. Click **"Run workflow"** 42 | 43 | ### 3. 🔍 Duplicate Issue Management (Automatic + Manual) 44 | **File:** `.github/workflows/duplicate-issue.yml` 45 | 46 | Handles duplicate detection automatically and allows manual checks. 47 | 48 | **Automatic triggers:** 49 | - When issues are opened, edited, or reopened 50 | - Automatically cleans up when issues are closed 51 | 52 | **Manual triggers:** 53 | - Check any specific issue number for duplicates 54 | 55 | ## 🎯 **Usage Examples:** 56 | 57 | ### **Recommended Workflow:** 58 | 1. **Validate APIs First:** Actions → API Validation → Choose "all-apis" → Run 59 | 2. **Then Perform Operations:** Actions → Database Operations → Choose your operation 60 | 61 | ### **Common Operations:** 62 | - **Validate APIs:** Actions → API Validation → Choose "all-apis" → Run 63 | - **Populate Issues:** Actions → Database Operations → Choose "populate-issues" → Run 64 | - **Clean Up Duplicates:** Actions → Database Operations → Choose "cleanup-duplicates" → ✅ Enable Force → Run 65 | - **Check Database Health:** Actions → Database Operations → Choose "debug-database" → Run 66 | - **Emergency Clear All:** Actions → Database Operations → Choose "clear-all-vectors" → ✅ Enable Force → Run 67 | 68 | ## 🛠️ Local Scripts (npm commands) 69 | 70 | You can also run these operations locally: 71 | 72 | ```bash 73 | # API Validation (NEW!) 74 | npm run validate # Test all API connections 75 | npm run validate:pinecone # Test only Pinecone connection 76 | npm run validate:github # Test only GitHub connection 77 | npm run validate:gemini # Test only Gemini API connection 78 | 79 | # Safe operations 80 | npm run populate-issues # Add existing issues to database 81 | npm run debug-db # Check database status 82 | npm run check-duplicates # Check for duplicates 83 | 84 | # Cleanup operations 85 | npm run cleanup-duplicates --force # Remove duplicates 86 | npm run cleanup-issue # Remove specific closed issue 87 | 88 | # Dangerous operations (use with caution!) 89 | npm run clear-all:force # ⚠️ Delete ALL vectors 90 | ``` 91 | 92 | ## 🔐 Required Secrets 93 | 94 | Make sure these secrets are configured in your repository: 95 | 96 | - `GITHUB_TOKEN` - Automatically provided by GitHub 97 | - `GEMINI_API_KEY` - Your Google Gemini API key 98 | - `PINECONE_API_KEY` - Your Pinecone API key 99 | - `PINECONE_INDEX` - Your Pinecone index name 100 | 101 | ## 🚨 Safety Features 102 | 103 | - **Force flags required** for destructive operations 104 | - **Confirmation prompts** in scripts 105 | - **Continue-on-error** for non-critical operations 106 | - **Detailed logging** for troubleshooting 107 | - **Verification steps** after dangerous operations 108 | 109 | ## 📊 Workflow Status 110 | 111 | Check the **Actions** tab to see: 112 | - ✅ Successful operations 113 | - ❌ Failed operations with detailed logs 114 | - 📋 Summary reports for each run 115 | 116 | ## 🆘 Troubleshooting 117 | 118 | ### Common Issues: 119 | 120 | 1. **API Rate Limits** 121 | - Wait a few minutes and retry 122 | - Check the logs for specific error messages 123 | 124 | 2. **Connection Failures** 125 | - Use "Test Connection" in Quick Actions 126 | - Verify your API keys are correct 127 | 128 | 3. **Database Issues** 129 | - Use "Debug Database" to check current state 130 | - Check Pinecone dashboard for index status 131 | 132 | 4. **Permission Errors** 133 | - Ensure GitHub token has `issues: write` permission 134 | - Check repository secrets are properly set 135 | 136 | ### Getting Help: 137 | 138 | 1. Check workflow logs for detailed error messages 139 | 2. Use the debug tools to understand current state 140 | 3. Run test connections to verify API access 141 | 4. Check this README for common solutions 142 | 143 | ## 🎯 Best Practices 144 | 145 | 1. **Regular Maintenance:** 146 | - Run "Populate Issues" after major issue imports 147 | - Use "Debug Status" to monitor database health 148 | - Clean up duplicates periodically 149 | 150 | 2. **Before Major Operations:** 151 | - Always run "Debug Database" first 152 | - Test connections to ensure APIs are working 153 | - Have a backup plan (you can repopulate from scratch) 154 | 155 | 3. **Safety First:** 156 | - Never use force flags unless you understand the consequences 157 | - Test operations in a development environment first 158 | - Keep your API keys secure and rotated regularly -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Celtrix 2 | 3 | Thank you for your interest in contributing to Celtrix! Your help is greatly appreciated. This guide will help you get started with contributing, reporting issues, and submitting pull requests. 4 | 5 | ## Table of Contents 6 | 7 | - [Code of Conduct](#code-of-conduct) 8 | - [How to Contribute](#how-to-contribute) 9 | - [Reporting Bugs](#reporting-bugs) 10 | - [Suggesting Enhancements](#suggesting-enhancements) 11 | - [Submitting Pull Requests](#submitting-pull-requests) 12 | - [Development Setup](#development-setup) 13 | - [Project Structure](#project-structure) 14 | - [Coding Guidelines](#coding-guidelines) 15 | - [Template Contributions](#template-contributions) 16 | - [Community & Support](#community--support) 17 | 18 | --- 19 | 20 | ## Code of Conduct 21 | 22 | This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers. 23 | 24 | ## How to Contribute 25 | 26 | ### Reporting Bugs or Issues 27 | 28 | - Search [issues](https://github.com/gunjanghate/Celtrix/issues) to see if your bug or suggestion is already reported. 29 | - If not, open a new issue and **follow this structure for better understanding:** 30 | - **Title:** Clear and descriptive 31 | - **Description:** 32 | - What is the problem or suggestion? 33 | - Steps to reproduce (for bugs) 34 | - Expected behavior 35 | - Actual behavior 36 | - Environment (OS, Node version, etc.) 37 | - **Screenshots or logs:** Attach if possible (for UI/CLI issues) 38 | - **Additional context:** Any other information that helps 39 | 40 | Following this structure helps maintainers and contributors understand and resolve your issue faster. 41 | 42 | ### Suggesting Enhancements 43 | 44 | - Check if your idea is already discussed in [issues](https://github.com/gunjanghate/Celtrix/issues). 45 | - Open a new issue for new suggestions. Please include: 46 | - Motivation and use case 47 | - Example scenarios 48 | - Any relevant code or references 49 | 50 | ### Submitting Pull Requests 51 | 52 | #### Rules for Raising Pull Requests (PRs) 53 | 54 | 1. **Fork** the repository and clone your fork. 55 | 2. **Create a new branch** for your feature or fix: 56 | 57 | ```sh 58 | git checkout -b feature/your-feature-name 59 | ``` 60 | 61 | 3. **Make your changes** and commit them with clear messages. 62 | 4. **Test** your changes locally. 63 | 5. **Push** to your fork and open a Pull Request (PR) against the `main` branch. 64 | 6. **Fill out the PR template and follow these rules:** 65 | 66 | - **Add screenshots or videos** (optional but encouraged) to demonstrate UI/CLI changes or bug fixes. 67 | - **Provide a clear description** of what your PR does and how it solves the issue or adds value. 68 | - **Reference related issues** by number (e.g., `Closes #123`). 69 | - **Explain any breaking changes** or important details. 70 | - **Keep PRs focused** on a single feature or fix. 71 | 72 | 7. Participate in the code review process and make requested changes. 73 | 74 | Following these rules helps reviewers understand your contribution and speeds up the merging process. 75 | 76 | ## Development Setup 77 | 78 | 1. **Clone the repository:** 79 | ```sh 80 | git clone https://github.com/gunjanghate/Celtrix.git 81 | cd Celtrix 82 | ``` 83 | 2. **Install dependencies:** 84 | ```sh 85 | npm install 86 | ``` 87 | 3. **Run the CLI locally:** 88 | ```sh 89 | node index.js 90 | ``` 91 | 4. **Test template scaffolding:** 92 | - Use the CLI to scaffold a new project and verify the output. 93 | 94 | ## Project Structure 95 | 96 | - `index.js` – Main entry point for the CLI. 97 | - `bin/` – CLI executable scripts. 98 | - `commands/` – CLI command handlers (e.g., scaffold logic). 99 | - `templates/` – Project templates (MERN, MEVN, T3, etc.). 100 | - `utils/` – Utility modules (installer, logger, project management, etc.). 101 | - `tests/` – Test cases and scripts. 102 | 103 | ## Coding Guidelines 104 | 105 | - Use clear, descriptive commit messages. 106 | - Follow the existing code style (use Prettier/ESLint if available). 107 | - Write modular, well-documented code. 108 | - Add or update tests for new features or bug fixes. 109 | - Keep PRs focused and minimal. 110 | 111 | ## Example Git Commands 112 | 113 | Here are some common git commands you may find useful when contributing: 114 | 115 | - **Clone the repository:** 116 | ```sh 117 | git clone https://github.com/gunjanghate/Celtrix.git 118 | ``` 119 | - **Create a new branch:** 120 | ```sh 121 | git checkout -b feature/your-feature-name 122 | ``` 123 | - **Check status of your changes:** 124 | ```sh 125 | git status 126 | ``` 127 | - **Stage files for commit:** 128 | ```sh 129 | git add . 130 | # or add specific files 131 | git add path/to/file.js 132 | ``` 133 | - **Commit your changes:** 134 | ```sh 135 | git commit -m "Add a clear, descriptive commit message" 136 | ``` 137 | - **Pull latest changes from main branch:** 138 | ```sh 139 | git pull origin main 140 | ``` 141 | - **Push your branch to your fork:** 142 | ```sh 143 | git push origin feature/your-feature-name 144 | ``` 145 | - **Fetch and rebase (to update your branch):** 146 | ```sh 147 | git fetch origin 148 | git rebase origin/main 149 | ``` 150 | 151 | --- 152 | 153 | ## Template Contributions 154 | 155 | To add or update a template: 156 | 157 | 1. Place new templates in the appropriate subfolder under `templates/`. 158 | 2. Ensure the template includes all necessary files (`package.json`, configs, etc.). 159 | 3. Test the template by scaffolding a project and running it. 160 | 4. Document any special instructions in the template's `README.md`. 161 | 162 | ## Community & Support 163 | 164 | - For questions, open a [discussion](https://github.com/gunjanghate/Celtrix/discussions) or join the community chat (if available). 165 | - Be respectful and constructive in all communications. 166 | 167 | --- 168 | 169 | Thank you for helping make Celtrix better! 170 | -------------------------------------------------------------------------------- /scripts/validate-apis.js: -------------------------------------------------------------------------------- 1 | import { Pinecone } from "@pinecone-database/pinecone"; 2 | import { Octokit } from "@octokit/rest"; 3 | import fetch from "node-fetch"; 4 | import dotenv from "dotenv"; 5 | 6 | // Load environment variables for local development 7 | dotenv.config(); 8 | 9 | // Validation functions 10 | async function validatePinecone() { 11 | try { 12 | if (!process.env.PINECONE_API_KEY) { 13 | throw new Error("PINECONE_API_KEY not found in environment variables"); 14 | } 15 | if (!process.env.PINECONE_INDEX) { 16 | throw new Error("PINECONE_INDEX not found in environment variables"); 17 | } 18 | 19 | const pinecone = new Pinecone({ apiKey: process.env.PINECONE_API_KEY }); 20 | const index = pinecone.Index(process.env.PINECONE_INDEX); 21 | 22 | const stats = await index.describeIndexStats(); 23 | 24 | console.log('✅ Pinecone connection successful'); 25 | console.log(`📊 Index: ${process.env.PINECONE_INDEX}`); 26 | console.log(`📈 Total vectors: ${stats.totalRecordCount || 0}`); 27 | console.log(`📐 Dimension: ${stats.dimension}`); 28 | 29 | return { success: true, stats }; 30 | } catch (error) { 31 | console.error('❌ Pinecone validation failed:', error.message); 32 | return { success: false, error: error.message }; 33 | } 34 | } 35 | 36 | async function validateGitHub() { 37 | try { 38 | if (!process.env.GITHUB_TOKEN) { 39 | throw new Error("GITHUB_TOKEN not found in environment variables"); 40 | } 41 | 42 | const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); 43 | 44 | // Test with current repository or fallback 45 | const owner = process.env.GITHUB_REPOSITORY?.split("/")[0] || process.env.GITHUB_OWNER || "seroski-ai"; 46 | const repo = process.env.GITHUB_REPOSITORY?.split("/")[1] || process.env.GITHUB_REPO || "seroski-dupbot"; 47 | 48 | const result = await octokit.repos.get({ owner, repo }); 49 | 50 | console.log('✅ GitHub connection successful'); 51 | console.log(`📋 Repository: ${result.data.full_name}`); 52 | console.log(`🔓 Access: ${result.data.permissions?.admin ? 'Admin' : result.data.permissions?.push ? 'Write' : 'Read'}`); 53 | 54 | return { success: true, repo: result.data }; 55 | } catch (error) { 56 | console.error('❌ GitHub validation failed:', error.message); 57 | return { success: false, error: error.message }; 58 | } 59 | } 60 | 61 | async function validateGemini() { 62 | try { 63 | if (!process.env.GEMINI_API_KEY) { 64 | throw new Error("GEMINI_API_KEY not found in environment variables"); 65 | } 66 | 67 | const response = await fetch( 68 | `https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:embedContent?key=${process.env.GEMINI_API_KEY}`, 69 | { 70 | method: "POST", 71 | headers: { "Content-Type": "application/json" }, 72 | body: JSON.stringify({ 73 | model: "models/text-embedding-004", 74 | content: { parts: [{ text: "connection test" }] } 75 | }), 76 | } 77 | ); 78 | 79 | if (!response.ok) { 80 | const errorData = await response.text(); 81 | throw new Error(`HTTP ${response.status}: ${response.statusText} - ${errorData}`); 82 | } 83 | 84 | const data = await response.json(); 85 | 86 | if (data.error) { 87 | throw new Error(data.error.message || 'Unknown Gemini API error'); 88 | } 89 | 90 | console.log('✅ Gemini API connection successful'); 91 | console.log('🧠 Model: text-embedding-004'); 92 | console.log(`📊 Embedding dimension: ${data.embedding?.values?.length || 'unknown'}`); 93 | 94 | return { success: true, embedding: data.embedding }; 95 | } catch (error) { 96 | console.error('❌ Gemini validation failed:', error.message); 97 | return { success: false, error: error.message }; 98 | } 99 | } 100 | 101 | async function validateAllConnections() { 102 | console.log('🔍 === API Connection Validation ===\n'); 103 | 104 | const results = { 105 | pinecone: await validatePinecone(), 106 | github: await validateGitHub(), 107 | gemini: await validateGemini() 108 | }; 109 | 110 | console.log('\n📋 === Validation Summary ==='); 111 | 112 | const successful = Object.values(results).filter(r => r.success).length; 113 | const total = Object.keys(results).length; 114 | 115 | console.log(`✅ Successful: ${successful}/${total}`); 116 | console.log(`❌ Failed: ${total - successful}/${total}`); 117 | 118 | if (successful === total) { 119 | console.log('\n🎉 All API connections are working correctly!'); 120 | process.exit(0); 121 | } else { 122 | console.log('\n⚠️ Some API connections failed. Check the errors above.'); 123 | process.exit(1); 124 | } 125 | } 126 | 127 | // Handle command line arguments 128 | const args = process.argv.slice(2); 129 | const service = args[0]; 130 | 131 | if (args.includes('--help') || args.includes('-h')) { 132 | console.log(` 133 | 📖 Usage: node scripts/validate-apis.js [service] 134 | 135 | 🔧 Available Services: 136 | pinecone - Test Pinecone vector database connection 137 | github - Test GitHub API connection 138 | gemini - Test Google Gemini API connection 139 | all - Test all connections (default) 140 | 141 | 🔧 Required Environment Variables: 142 | - PINECONE_API_KEY: Pinecone API key 143 | - PINECONE_INDEX: Pinecone index name 144 | - GITHUB_TOKEN: GitHub personal access token 145 | - GEMINI_API_KEY: Google Gemini API key 146 | - GITHUB_REPOSITORY: Repository in format "owner/repo" (optional) 147 | 148 | 📝 Examples: 149 | node scripts/validate-apis.js # Test all connections 150 | node scripts/validate-apis.js pinecone # Test only Pinecone 151 | node scripts/validate-apis.js gemini # Test only Gemini 152 | `); 153 | process.exit(0); 154 | } 155 | 156 | // Run specific service or all 157 | switch (service) { 158 | case 'pinecone': 159 | validatePinecone().then(result => { 160 | process.exit(result.success ? 0 : 1); 161 | }); 162 | break; 163 | case 'github': 164 | validateGitHub().then(result => { 165 | process.exit(result.success ? 0 : 1); 166 | }); 167 | break; 168 | case 'gemini': 169 | validateGemini().then(result => { 170 | process.exit(result.success ? 0 : 1); 171 | }); 172 | break; 173 | default: 174 | validateAllConnections(); 175 | } -------------------------------------------------------------------------------- /utils/project.js: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import fs from "fs-extra"; 3 | import chalk from "chalk"; 4 | import boxen from "boxen"; 5 | import { logger } from "./logger.js"; 6 | import { copyTemplates } from "./templateManager.js"; 7 | import { HonoReactSetup,mernTailwindSetup, installDependencies, mernSetup, serverAuthSetup, serverSetup, mevnSetup, mevnTailwindAuthSetup, nextSetup } from "./installer.js"; 8 | import { angularSetup, angularTailwindSetup } from "./installer.js"; 9 | 10 | export async function setupProject(projectName, config, installDeps) { 11 | const projectPath = path.join(process.cwd(), projectName); 12 | 13 | if (fs.existsSync(projectPath)) { 14 | logger.error(`❌ Directory ${chalk.red(projectName)} already exists`); 15 | process.exit(1); 16 | } 17 | 18 | fs.mkdirSync(projectPath); 19 | 20 | // --- Pretty Project Config (Boxed) --- 21 | const configText = ` 22 | ${chalk.bold("🌐 Stack:")} ${chalk.green(config.stack)} 23 | ${chalk.bold("📦 Project Name:")} ${chalk.blue(projectName)} 24 | ${chalk.bold("📖 Language:")} ${chalk.red(config.language)} 25 | ${chalk.bold("📦 Package Manager")} ${chalk.magenta(config.packageManager)} 26 | `; 27 | 28 | console.log( 29 | boxen(configText, { 30 | padding: 1, 31 | margin: 1, 32 | borderColor: "cyan", 33 | borderStyle: "round", 34 | title: chalk.cyanBright("📋 Project Configuration"), 35 | titleAlignment: "center", 36 | }) 37 | ); 38 | 39 | // --- Copy & Install --- 40 | 41 | 42 | if (config.stack === "mern") { 43 | mernSetup(projectPath, config, projectName, installDeps); 44 | copyTemplates(projectPath, config); 45 | if (installDeps) installDependencies(projectPath, config, projectName, false, []) 46 | } 47 | 48 | else if (config.stack === 'mevn') { 49 | mevnSetup(projectPath, config, projectName, installDeps) 50 | copyTemplates(projectPath, config) 51 | if (installDeps) installDependencies(projectPath, config, projectName, false, []) 52 | } 53 | 54 | else if (config.stack === "mean") { 55 | angularSetup(projectPath, config, projectName, installDeps); 56 | copyTemplates(projectPath, config); 57 | if (installDeps) installDependencies(projectPath, config, projectName); 58 | } 59 | 60 | else if (config.stack === "mern+tailwind+auth") { 61 | mernSetup(projectPath, config, projectName, installDeps); 62 | copyTemplates(projectPath, config); 63 | mernTailwindSetup(projectPath, config, projectName); 64 | serverAuthSetup(projectPath, config, projectName, installDeps); 65 | } 66 | 67 | else if (config.stack === 'mevn+tailwind+auth') { 68 | mevnTailwindAuthSetup(projectPath, config, projectName, installDeps); 69 | copyTemplates(projectPath, config); 70 | serverAuthSetup(projectPath, config, projectName, installDeps) 71 | } 72 | 73 | else if (config.stack === "mean+tailwind+auth") { 74 | angularTailwindSetup(projectPath, config, projectName); 75 | copyTemplates(projectPath, config); 76 | if (installDeps) installDependencies(projectPath, config, projectName); 77 | serverAuthSetup(projectPath, config, projectName, installDeps); 78 | } 79 | 80 | 81 | else if (config.stack === "react+tailwind+firebase") { 82 | copyTemplates(projectPath, config); 83 | if (installDeps) installDependencies(projectPath, config, projectName); 84 | } 85 | 86 | 87 | else if (config.stack === "hono") { 88 | try { 89 | HonoReactSetup(projectPath, config, projectName, installDeps); 90 | copyTemplates(projectPath, config); 91 | if (installDeps) installDependencies(projectPath, config, projectName, false); 92 | } 93 | catch { 94 | copyTemplates(projectPath, config); 95 | } 96 | } 97 | 98 | else if (config.stack === 'nextjs') { 99 | try { 100 | nextSetup(projectPath,config,projectName); 101 | copyTemplates(projectPath,config) 102 | logger.info("✅ Next.js project created successfully!"); 103 | } catch (error) { 104 | logger.error("❌ Failed to set up Next.js"); 105 | logger.error(error.message); 106 | throw error; 107 | } 108 | } 109 | 110 | // --- Success + Next Steps --- 111 | console.log(chalk.gray("-------------------------------------------")) 112 | console.log(`${chalk.greenBright(`✅ Project ${chalk.bold.yellow(`${projectName}`)} created successfully! 🎉`)}`); 113 | console.log(chalk.gray("-------------------------------------------")) 114 | console.log(chalk.cyan("👉 Next Steps:\n")); 115 | 116 | // Provide package-manager commands for dev/start 117 | const cmd = (script) => { 118 | switch (config.packageManager) { 119 | case "yarn": 120 | return `yarn ${script == "dev" ? "dev" : "node server.js"}`; 121 | case "pnpm": 122 | // pnpm supports both `pnpm run