Skip to content

CodeGen Backend : A full automatic AI Agent for creating functional website , Landing pages and custom Component in React and Typesrcipt

License

Notifications You must be signed in to change notification settings

AshutoshDM1/CodeGen-Server

Repository files navigation

CodeGen Server

version license node

CodeGen Server is a powerful AI-powered code generation API that provides endpoints for AI code template generation, refining prompts, chatting with AI assistants, and managing coding projects.

🚀 Live Deployments

Frontend Live Project

✨ Features

  • 🤖 AI Code Generation: Generate code templates based on prompts
  • 💬 AI Chat: Interact with AI assistants for coding help
  • 📝 Project Management: Create and organize coding projects
  • 📊 Message History: Store and retrieve conversation history
  • 🔍 Code Storage: Save and retrieve generated code snippets

📋 API Endpoints

The API provides the following main endpoint groups:

  • /api/v1/ai: AI-related endpoints for code generation and chatting
  • /api/v1/message: Message management endpoints
  • /api/v1/project: Project management endpoints
  • /api/v1/code: Code snippet management endpoints

For detailed API documentation, visit the API docs.

🛠️ Technology Stack

  • Runtime: Node.js with TypeScript
  • Framework: Express.js
  • Database: Prisma ORM
  • AI Integration: Google Gemini AI
  • Documentation: OpenAPI / Swagger

🚀 Getting Started

Prerequisites

  • Node.js 14.x or higher
  • pnpm (or npm/yarn)
  • Database (configured via Prisma)

Installation

  1. Clone the repository:

    git clone https://github.com/AshutoshDM1/CodeGen-Server.git
    cd CodeGen-Server
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    cp .env.example .env
    # Edit .env with your configuration
  4. Generate Prisma client:

    pnpx prisma generate
  5. Run database migrations:

    pnpx prisma migrate deploy
  6. Build the application:

    pnpm build
  7. Start the server:

    pnpm start

For development mode with hot-reloading:

pnpm dev

🔧 Configuration

Create a .env file with the following variables:

# Server
PORT=4000

# Database
DATABASE_URL="your-database-url"

# AI Configuration
GEMINI_API_KEY="your-gemini-api-key"

# CORS origins (comma-separated)
ALLOWED_ORIGINS="http://localhost:3000,https://yourdomain.com"

🤝 Contributing

Contributions are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Submit a pull request

Please make sure to update tests as appropriate and follow the code style of the project.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📧 Contact

For questions or support, please open an issue on this repository or contact the maintainers directly.


Made with ❤️ by the Ashutosh

About

CodeGen Backend : A full automatic AI Agent for creating functional website , Landing pages and custom Component in React and Typesrcipt

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published