diff --git a/.env.example b/.env.example index 7a550fe..2137088 100644 --- a/.env.example +++ b/.env.example @@ -1,9 +1,14 @@ -# GEMINI_API_KEY: Required for Gemini AI API calls. -# AI Studio automatically injects this at runtime from user secrets. -# Users configure this via the Secrets panel in the AI Studio UI. +# GEMINI_API_KEY: Required for live Gemini AI API calls. +# AI Studio can inject this at runtime from user secrets. GEMINI_API_KEY="MY_GEMINI_API_KEY" +# GEMINI_MODEL: Optional model override for the RKix command endpoint. +# Defaults to gemini-2.5-flash when omitted. +GEMINI_MODEL="gemini-2.5-flash" + +# PORT: Optional local/server port. +PORT="3000" + # APP_URL: The URL where this applet is hosted. -# AI Studio automatically injects this at runtime with the Cloud Run service URL. -# Used for self-referential links, OAuth callbacks, and API endpoints. +# AI Studio can inject this at runtime with the Cloud Run service URL. APP_URL="MY_APP_URL" diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..42bf91f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: # Replace with a single Buy Me a Coffee username +thanks_dev: # Replace with a single thanks.dev username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..48d5f81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..67be9b0 --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,51 @@ +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll with GitHub Pages dependencies preinstalled + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./ + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..460f782 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 0000000..9626ff6 --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,28 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx webpack diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..31e25eb --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +terkix.com \ No newline at end of file diff --git a/README.md b/README.md index e69de29..5945940 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,94 @@ +# RKix Terminal OS + +RKix Terminal OS is an AI-native development workspace built with React, Vite, Express, and the Google Gemini API. It provides a terminal-first interface for managing virtual projects, files, agent workflows, deployments, plugins, contacts, and telemetry dashboards. + +## What this repo contains + +- **React 19 SPA** for the RKix terminal, workspace explorer, dashboard, plugin hub, contacts manager, and telemetry views. +- **Express + Vite server** for local development and production static hosting. +- **Gemini command API** at `/api/gemini/command` for multi-agent workflow generation with an offline simulator fallback in the UI. +- **Safe local persistence** for projects, terminal history, active workspace, and command metrics. + +## Requirements + +- Node.js 22 or newer is recommended. +- npm 10 or newer. +- A Gemini API key when you want live AI responses. Without a configured key, the client falls back to the built-in simulator. + +## Environment setup + +Copy the example environment file and fill in your values: + +```bash +cp .env.example .env +``` + +Supported variables: + +| Variable | Required | Default | Description | +| --- | --- | --- | --- | +| `GEMINI_API_KEY` | Yes for live AI | _none_ | API key used by `@google/genai`. | +| `GEMINI_MODEL` | No | `gemini-2.5-flash` | Model used by the server command endpoint. | +| `PORT` | No | `3000` | Port for the Express/Vite server. | +| `APP_URL` | No | _none_ | Public URL used by hosted environments. | + +## Development + +Install dependencies: + +```bash +npm install +``` + +Run the app locally: + +```bash +npm run dev +``` + +Open `http://localhost:3000`. + +## Quality checks + +Run TypeScript validation: + +```bash +npm run typecheck +``` + +Run the full production build: + +```bash +npm run build +``` + +Start the production build: + +```bash +npm start +``` + +Check server health when the app is running: + +```bash +curl http://localhost:3000/api/health +``` + +## Project structure + +```text +. +├── server.ts # Express server and Gemini command endpoint +├── src/App.tsx # Main RKix UI shell and workspace logic +├── src/components/ # Dashboard, project, plugin, contact, and chart modules +├── src/data/presets.ts # Default virtual projects and sample workspace files +├── src/types.ts # Shared domain types +└── src/utils/storage.ts # Defensive localStorage helpers +``` + +## Notes for contributors + +- Keep generated workspace file paths under `workspace/project/...` so the RKix virtual file explorer can mount them correctly. +- Keep dependencies that are only needed for builds or tooling in `devDependencies`. +- Do not commit `.env` files or real API keys. +- Run `npm run typecheck` and `npm run build` before opening a pull request. diff --git a/index.html b/index.html index 21dfe69..380ace8 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,11 @@
-