<<<<<<< HEAD
You can run the Azure Cosmos DB emulator locally (recommended for development and testing).
Requirements:
- Docker
Start emulator:
npm run emulator:runStop emulator:
npm run emulator:stopUse .env.example as a template for your environment variables and copy it to .env:
cp .env.example .envThe emulator listens on https://localhost:8081/ and the example .env contains the emulator key.
A state-of-the-art, top-of-the-line React application featuring advanced AI integration with GPT-4o and Claude-4 agentic coding capabilities, elite terminal emulation, self-aware system monitoring, real-time cryptocurrency tracking, task management, portfolio tracking, and Kubernetes-ready deployment.
-
Advanced Agentic AI Capabilities:
- π€ Multi-step reasoning with GPT-4o, Claude-3.5-Sonnet, and O1 models
- π§ Function calling and tool execution
- π Code execution for data analysis (JavaScript/Python)
- π Iterative problem-solving with up to 5 reasoning steps
- π‘ Real-time cryptocurrency data fetching and portfolio analysis
-
Persmix Elite Module: Cutting-edge modular UI components with ultra-fast rendering and seamless integration.
-
Azure AI Integration: Advanced AI conversation powered by GitHub Models and Azure AI Foundry with cryptocurrency analysis and trading assistance.
-
Elite Terminal: Secure backend-executed command-line interface with history and auto-completion.
-
System Status Monitor: Self-aware component displaying real-time system metrics (uptime, memory, platform).
-
Cryptocurrency Dashboard: Multi-chain wallet integration for Litecoin, Bitcoin, Ethereum, and more.
-
Kubernetes Deployment: Production-ready containerization and orchestration manifests.
-
Docker Support: Multi-service container setup with frontend, backend, and image service.
- Frontend: React 18, Vite, Chart.js, PropTypes
- Backend: Node.js, Express, OpenAI API
- Deployment: Docker, Kubernetes, Nginx
- Testing: Vitest, React Testing Library
- Styling: CSS Modules, Inline Styles
codespaces-react/
βββ src/
β βββ Persmix/ # Elite module components
β β βββ Persmix.jsx # Main elite module
β β βββ PersmixOpenAIChat.jsx # AI chat component
β β βββ EliteTerminal.jsx # Terminal emulator
β β βββ SystemStatus.jsx # System monitor
β β βββ Persmix.css # Elite styling
β β βββ index.js # Module exports
β βββ data/
β β βββ transactions.js # Sample transaction data
β βββ __tests__/ # Test files
β βββ App.jsx # Main application
β βββ index.jsx # React entry point
β βββ *.css # Global styles
βββ openai.js # Backend server
βββ Dockerfile # Frontend container
βββ Dockerfile.backend # Backend container
βββ docker-compose.yml # Local multi-service setup
βββ k8s-deployment.yaml # Kubernetes manifests
βββ package.json # Dependencies and scripts
βββ README.md # This file
- Node.js 18+
- Docker (for containerized deployment)
- kubectl (for Kubernetes deployment)
-
Clone and Install:
```bash (see
.env.examplefor reference):# Azure AI Configuration (GitHub Models - Free Tier) AZURE_ENDPOINT=https://models.inference.ai.azure.com AZURE_API_KEY=your_github_token_here AZURE_MODEL=gpt-4o # Advanced Agentic Features ENABLE_FUNCTION_CALLING=true MAX_ITERATIONS=5 # Azure Cosmos DB (optional, defaults to local emulator) COSMOS_ENDPOINT=https://localhost:8081 COSMOS_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== # Server Configuration PORT=3002
Getting Started with GitHub Models:
- Visit https://github.com/marketplace/models
- Create a GitHub Personal Access Token (classic) with
read:packagesscope - Use the token as
AZURE_API_KEY - Free tier includes: GPT-4o, GPT-4o-mini, Claude-3.5-Sonnet, O1-preview, and more!
Supported Models:
gpt-4o- Advanced reasoning and coding (recommended)gpt-4o-mini- Fast and efficientclaude-3.5-sonnet- Anthropic's latest modelo1-preview- Advanced multi-step reasoningo1-mini- Efficient reasoning model
Advanced Agentic Features:
- Multi-step reasoning for complex tasks
- Function calling for cryptocurrency data and portfolio analysis
- Code execution capabilities (JavaScript)
- Automatic tool selection and chaining COSMOS_KEY=your-cosmos-key-here
-
Run Locally:
# Terminal 1: Start backend npm run server # Terminal 2: Start frontend npm start
-
Access:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
# Build and run with Docker Compose
docker-compose up --build-
Build and Push Images:
docker build -t your-registry/codespaces-react:latest . docker build -f Dockerfile.backend -t your-registry/codespaces-react-backend:latest . docker push your-registry/codespaces-react:latest docker push your-registry/codespaces-react-backend:latest
-
Update Secrets:
# Encode OpenAI API key echo -n 'your-api-key' | base64 # Update k8s-deployment.yaml with the encoded key
-
Deploy:
kubectl apply -f k8s-deployment.yaml
npm start- Start development servernpm run build- Build for productionnpm test- Run testsnpm run server- Start backend servernpm run preview- Preview production build
OPENAI_API_KEY- Required for AI chat functionalityPORT- Backend server port (default: 3001)REACT_APP_API_URL- Frontend API endpoint (default: http://localhost:3001)
- Update
k8s-deployment.yamlwith your registry and domain - Configure ingress for external access
- Adjust replica counts for scaling
npm testTests include:
- Component rendering
- User interactions
- API integrations
- Terminal functionality
POST /api/openai- Chat with AIPOST /api/terminal- Execute terminal commandsGET /api/status- System status information
- Backend command execution with timeout limits
- API key management via environment variables
- Containerized isolation
- No direct shell access from frontend
- Fork the repository
- Create feature branch
- Commit changes
- Push and create PR
This project is licensed under the MIT License.
- Built with Vite and React
- Powered by OpenAI GPT-4
- Containerized with Docker
- Orchestrated on Kubernetes
In the project directory, you can run:
Gemini 3 Pro and Gemini 3 Flash are available via the Gemini CLI. The Codespace includes the Gemini CLI; to ensure you have the latest version, run:
npm install -g @google/gemini-cli@latestAfter installing, use the Gemini CLI to list available models and invoke the CLI tools. This project is configured to work with Gemini 3 Pro and Gemini 3 Flash where applicable.
We've already run this for you in the Codespaces: server terminal window below. If you need to stop the server for any reason you can just run npm start again to bring it back online.
Runs the app in the development mode.
Open http://localhost:3000/ in the built-in Simple Browser (Cmd/Ctrl + Shift + P > Simple Browser: Show) to view your running application.
The page will reload automatically when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
You can learn more in the Vite documentation.
To learn Vitest, a Vite-native testing framework, go to Vitest documentation
To learn React, check out the React documentation.
This section has moved here: https://sambitsahoo.com/blog/vite-code-splitting-that-works.html
This section has moved here: https://github.com/btd/rollup-plugin-visualizer#rollup-plugin-visualizer
This section has moved here: https://dev.to/hamdankhan364/simplifying-progressive-web-app-pwa-development-with-vite-a-beginners-guide-38cf
If you need to reload the Codespace UI after making changes:
Option A: Trigger a UI reload
echo "Press Ctrl+Shift+P and run 'Developer: Reload Window'"Option B: Restart the Codespace server (if available) There is no single universal command for this; use the Codespaces UI controls to restart the server if needed.
=======
A minimal React app scaffolded for a Codespace. This project uses Vite, React, Vitest and ESLint.
Quick start
Install dependencies:
npm installRun the dev server (binds to all interfaces):
chore/split-chunks-readme
npm startOpen in browser: http://localhost:3000 (Vite may pick another port if 3000 is in use)
Run tests:
<<<<<<< HEAD
If you need support for this project, contact:
-
Support email: dreadwitdastacc@gmail.com
-
Website: http://gogominmine.com
-
Maintainer: Devon Miller
-
Maintainer: Ogun (obaluaye)
You can also see SUPPORT.md for full contact details.
echo "See project contributors" > CONTRIBUTORS.txt git add CONTRIBUTORS.txt && git commit -m "chore: add CONTRIBUTORS.txt" git push fork Dreadwitdastacc-Ifawole
npm testBuild for production:
npm run buildLint source:
npx eslint "src/**/*.{js,jsx}"Notes
- A
.envplaceholder was created forGITHUB_TOKEN(replace with your token locally, do not commit secrets). - The build uses rollup
manualChunksto split vendor modules into per-package chunks to reduce single large bundles.
chore/split-chunks-readme