### Create a New App with Celtrix Source: https://github.com/celtrix-os/celtrix/blob/main/README.md Run this command to start a new project. Follow the interactive prompts to customize your setup. ```bash npx celtrix my-app ``` -------------------------------- ### Build and Run Server in Production Mode Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Builds the application for production and then starts the production server. ```bash npm run build npm start ``` -------------------------------- ### Install Dependencies Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/javascript/server/README.md Installs the necessary project dependencies. ```bash npm install ``` -------------------------------- ### Start Development Server Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/javascript/server/README.md Starts the local development server for Hono applications. ```bash npm run dev ``` -------------------------------- ### Copy Environment File (Linux/Mac) Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Copies the example environment file to a new file for configuration on Linux or macOS. ```bash cp .env.example .env ``` -------------------------------- ### Install Dependencies Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Installs project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Environment Variables Configuration Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Example environment variables for server, authentication, database, Redis, and file uploads. ```env # Server configuration PORT=5000 # Port the server will run on HOST=localhost # Host address NODE_ENV=development # Environment (development/production/test) CORS_ENABLED=true # Enable/disable CORS RATE_LIMIT_ENABLED=false # Enable/disable rate limiting # Authentication JWT_SECRET=your_jwt_secret_key_here # Secret for JWT tokens JWT_EXPIRATION=7d # Token expiration time # Database DB_NAME=your_database_name DB_CONNECTION_STRING=mongodb://localhost:27017/your_database_name # Redis (if enabled) REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=your_redis_password # File uploads UPLOAD_DIR=uploads TEMP_DIR=temp MAX_FILE_SIZE=10mb # Maximum file upload size ``` -------------------------------- ### Copy Environment File (Windows CMD) Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Copies the example environment file to a new file for configuration on Windows using the Command Prompt. ```bash copy .env.example .env ``` -------------------------------- ### Copy Environment File (Windows PowerShell) Source: https://github.com/celtrix-os/celtrix/blob/main/templates/mern/Ts-Backend/readme.md Copies the example environment file to a new file for configuration on Windows using PowerShell. ```powershell Copy-Item .env.example .env ``` -------------------------------- ### Clone the Celtrix Repository Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Clone the Celtrix repository to your local machine to start development. Navigate into the cloned directory afterwards. ```sh git clone https://github.com/gunjanghate/Celtrix.git cd Celtrix ``` -------------------------------- ### Expand ESLint with React-Specific Rules Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/typescript/client/README.md Integrate `eslint-plugin-react-x` and `eslint-plugin-react-dom` for React and React DOM specific lint rules. This configuration extends the ESLint setup with recommended TypeScript and React DOM rules. ```typescript // eslint.config.js import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` -------------------------------- ### Build for Production Source: https://github.com/celtrix-os/celtrix/blob/main/templates/react+tailwind+firebase/javascript/client/README.md Use this script to create an optimized production build of your application. ```bash npm run build ``` -------------------------------- ### Preview Production Build Source: https://github.com/celtrix-os/celtrix/blob/main/templates/react+tailwind+firebase/javascript/client/README.md This command allows you to preview the production build locally before deployment. ```bash npm run preview ``` -------------------------------- ### Clone the Repository Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Clone the Celtrix repository to your local machine. This is the first step for setting up the development environment. ```sh git clone https://github.com/gunjanghate/Celtrix.git ``` -------------------------------- ### Run the CLI Locally Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Execute the Celtrix CLI directly from your local development environment. ```sh node index.js ``` -------------------------------- ### Instantiate Hono with Cloudflare Bindings Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/javascript/server/README.md Demonstrates how to instantiate Hono, passing CloudflareBindings as generics for type safety. This is crucial when your Hono application interacts with Cloudflare Worker specific bindings. ```typescript // src/index.ts const app = new Hono<{ Bindings: CloudflareBindings }>() ``` -------------------------------- ### Run ESLint for Code Linting Source: https://github.com/celtrix-os/celtrix/blob/main/templates/react+tailwind+firebase/javascript/client/README.md Execute this script to run ESLint and check your code for potential errors and style issues. ```bash npm run lint ``` -------------------------------- ### Stage Files for Commit Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Use 'git add' to stage changes for your next commit. You can add all changes or specific files. ```sh git add . # or add specific files git add path/to/file.js ``` -------------------------------- ### Firebase Environment Configuration Source: https://github.com/celtrix-os/celtrix/blob/main/templates/react+tailwind+firebase/javascript/client/README.md Create a .env file in the root directory and populate it with your Firebase project's configuration details. Ensure you replace the placeholder values with your actual API keys and IDs obtained from the Firebase Console. ```env VITE_FIREBASE_API_KEY=your_api_key_here VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id ``` -------------------------------- ### Run API Validation Locally Source: https://github.com/celtrix-os/celtrix/blob/main/WORKFLOWS.md Execute API connection tests using npm commands. Use specific commands to test individual API connections. ```bash npm run validate # Test all API connections npm run validate:pinecone # Test only Pinecone connection npm run validate:github # Test only GitHub connection npm run validate:gemini # Test only Gemini API connection ``` -------------------------------- ### Deploy Hono Application Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/javascript/server/README.md Deploys the Hono application, typically to a cloud platform like Cloudflare Workers. ```bash npm run deploy ``` -------------------------------- ### Create a New Branch for Feature/Fix Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Use this command to create a new branch for your feature or bug fix. Replace 'your-feature-name' with a descriptive name. ```sh git checkout -b feature/your-feature-name ``` -------------------------------- ### Push Branch to Fork Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Upload your local branch with its commits to your fork on the remote repository. ```sh git push origin feature/your-feature-name ``` -------------------------------- ### Run Cleanup Operations Locally Source: https://github.com/celtrix-os/celtrix/blob/main/WORKFLOWS.md Execute cleanup operations like removing duplicates or specific closed issues using npm commands. The `--force` flag is required for duplicate cleanup. ```bash npm run cleanup-duplicates --force # Remove duplicates npm run cleanup-issue # Remove specific closed issue ``` -------------------------------- ### Run Safe Database Operations Locally Source: https://github.com/celtrix-os/celtrix/blob/main/WORKFLOWS.md Perform safe database operations such as populating issues or debugging the database using npm commands. ```bash npm run populate-issues # Add existing issues to database npm run debug-db # Check database status npm run check-duplicates # Check for duplicates ``` -------------------------------- ### Fetch and Rebase Branch Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Update your current branch by fetching changes from the remote and rebasing onto the 'main' branch. This helps keep your branch up-to-date. ```sh git fetch origin git rebase origin/main ``` -------------------------------- ### Run Dangerous Database Operations Locally Source: https://github.com/celtrix-os/celtrix/blob/main/WORKFLOWS.md Execute dangerous database operations such as clearing all vectors. Use with extreme caution as these operations are destructive and require a force flag. ```bash npm run clear-all:force # ⚠️ Delete ALL vectors ``` -------------------------------- ### Expand ESLint with Type-Checked Rules Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/typescript/client/README.md Configure ESLint to enable type-aware lint rules by extending `tseslint.configs.recommendedTypeChecked`, `strictTypeChecked`, or `stylisticTypeChecked`. Ensure `tsconfig.node.json` and `tsconfig.app.json` are specified in `parserOptions.project`. ```typescript export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this ...tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules ...tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules ...tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` -------------------------------- ### Pull Latest Changes Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Fetch and merge the latest changes from the 'main' branch of the remote repository into your current branch. ```sh git pull origin main ``` -------------------------------- ### Commit Changes Source: https://github.com/celtrix-os/celtrix/blob/main/CONTRIBUTING.md Commit your staged changes with a clear and descriptive message. This message should explain the purpose of the changes. ```sh git commit -m "Add a clear, descriptive commit message" ``` -------------------------------- ### Generate Cloudflare Worker Types Source: https://github.com/celtrix-os/celtrix/blob/main/templates/hono/javascript/server/README.md Generates type definitions for Cloudflare Worker bindings based on your configuration. This command is essential for type safety when using Hono with Cloudflare Workers. ```bash npm run cf-typegen ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.