Skip to content

techySPHINX/AstroLith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AstroLith

License: ISC React Vite Node.js Express MongoDB Socket.io WebContainer Google Gemini AI Build Status


🚀 Overview

AstroLith is a cutting-edge, full-stack, generative AI-powered software engineering platform. It functions as a MERN stack developer, dynamically generating and serving code using WebContainer technology. This robust application features a Node.js, Express, MongoDB, and Redis backend, integrated with Google Gemini AI. The modern frontend, built with React and Vite, offers a comprehensive suite of developer tools for real-time, collaborative, and AI-enhanced coding experiences, including advanced version control and intelligent code assistance.


🧩 Key Features

  • Generative AI Developer: Acts as a MERN stack engineer, generating code based on user prompts and serving it instantly via WebContainer.
  • WebContainer Integration: Run Node.js code directly in the browser for a seamless, serverless development experience.
  • Real-Time Collaborative Editor: Powered by Y.js and Monaco Editor for instant, conflict-free multi-user code editing with real-time cursor synchronization.
  • Role-Based Access Control (RBAC): Granular permissions (Owner, Editor, Viewer) for project collaborators, ensuring secure and controlled access to project resources.
  • Git Integration (GitHub API): Seamlessly commit, branch, pull, and manage code versions directly from the platform using the GitHub API.
  • Project & User Management: Create, update, and manage projects; add users to projects; maintain a file tree per project; secure authentication with hashed passwords.
  • Enhanced AI Integration: Leverage Google Gemini AI for:
    • AI-Powered Code Completion: Intelligent code suggestions as you type.
    • AI-Powered Debugging: Analyze code and error details to identify and suggest fixes for bugs.
    • AI-Powered Code Review: Automated review of code for best practices, potential bugs, security vulnerabilities, and style issues.
  • Redis Caching: Fast, scalable caching for improved performance.
  • RESTful API: Clean, modular, and well-documented endpoints.
  • Modern UI/UX: Built with React 18, React Router v7, and Remixicon for a fast, responsive, and beautiful interface.
  • Markdown & Syntax Highlighting: Supports markdown rendering and code highlighting for documentation and code previews.
  • Developer Experience: Integrated ESLint, React hooks linting, and Vite for fast builds and hot reloading.

🏗️ Tech Stack

Frontend

Technology Purpose
React 18 Component-based UI
Vite Lightning-fast build tool & dev server
@webcontainer/api In-browser Node.js runtime
Socket.io-client Real-time communication
Axios HTTP client for API requests
React Router v7 Client-side routing
Remixicon Icon library
highlight.js Syntax highlighting
markdown-to-jsx Markdown rendering
ESLint Code linting and quality
monaco-editor Advanced code editor (VS Code editor)
y-monaco Monaco Editor binding for Y.js
yjs Conflict-free Replicated Data Types (CRDT)
y-websocket WebSocket connector for Y.js

Backend

Technology Purpose
Node.js Backend runtime
Express API server
MongoDB Database
Mongoose MongoDB ODM
Socket.io Real-time communication
Redis (ioredis) Caching and session storage
Google Gemini AI Generative AI services
bcrypt Password hashing
jsonwebtoken Authentication
dotenv Environment variable management
morgan HTTP request logging
express-validator Input validation
@octokit/rest GitHub API interaction
y-websocket WebSocket server for Y.js
yjs Conflict-free Replicated Data Types (CRDT)

⚡ Getting Started

Prerequisites

  • Node.js (v20.x recommended)
  • npm (v9.x+)
  • MongoDB instance
  • Redis instance
  • Google Gemini AI API Key
  • GitHub Personal Access Token (PAT): Required for Git integration features. Generate one with repo scope from GitHub Developer Settings.

1. Clone the repository

git clone https://github.com/techySPHINX/AstroLith
cd AstroLith

2. Setup Backend

cd backend
npm install
  • Create a .env file in the backend directory with the following content:

    MONGODB_URI=your_mongodb_connection_string
    REDIS_HOST=your_redis_host
    REDIS_PORT=your_redis_port
    REDIS_PASSWORD=your_redis_password
    GOOGLE_AI_KEY=your_google_gemini_api_key
    JWT_SECRET=your_jwt_secret
    
  • Start the backend server:

    npm start
  • Start the Y.js WebSocket server (for real-time collaboration):

    npm run y-server

3. Setup Frontend

cd ../frontend
npm install
  • Start the development server:

    npm run dev
  • Build for production:

    npm run build
  • Preview the production build:

    npm run preview

🏷️ Tags

#GenerativeAI #MERN #React #Vite #WebContainer #SocketIO #Frontend #Backend #NodeJS #Express #MongoDB #Redis #GoogleGeminiAI #AI #CodeGeneration #DeveloperTools #Collaboration #Realtime #GitIntegration #GitHubAPI #RBAC #MonacoEditor #Yjs


📄 License

This project is licensed under the ISC License.


🙏 Acknowledgements


For questions, issues, or feature requests, please open an issue on our GitHub repository: https://github.com/techySPHINX/AstroLith

About

Generative Ai Developer to create code and serve with Web-Container.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published