Skip to content

vivekmuskan003/codexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Codexa — AI-Powered Developer Workspace

Your AI co-worker for everything code.

Codexa is a full-stack SaaS platform that replaces 8 separate developer tools with one AI-powered workspace. Code review, documentation generation, error explanation, stack migration, test writing, SQL building, security scanning, and team collaboration — all in one place.


✨ Features

8 AI Tools

Tool Description Plan
Code Review Severity-ranked findings with fix suggestions Free
Doc Generator JSDoc, TSDoc, README, API Reference Free
Error Explainer Root cause analysis + working fixes Free
Test Writer Complete test suites with edge cases Free
SQL Builder Natural language → optimized SQL Free
Stack Migrator Migrate between languages/frameworks Pro
Security Scanner OWASP Top 10 vulnerability analysis Pro
Team Workspace Shared prompts, analytics, collaboration Team

AI Agents (Pro+)

  • GitHub Agent — Connect GitHub, browse repos, analyze code with AI
  • Gmail Agent — Read emails, draft replies, automate inbox with AI

Platform

  • 🔐 JWT authentication + OAuth (GitHub, Google)
  • 💳 Razorpay payments (UPI, Cards, NetBanking — works in India)
  • 👥 Team management with roles (Owner/Admin/Member)
  • 📊 Usage analytics and AI cost tracking
  • 🛡️ Hidden admin panel with full user/payment management
  • 🌙 Dark/Light mode

🛠️ Tech Stack

Layer Technology
Frontend Next.js 14, TypeScript, Tailwind CSS, Zustand
Backend Express.js, TypeScript, Prisma
Database PostgreSQL (Supabase)
AI Anthropic Claude (primary) + Groq (fallback)
Cache Upstash Redis
Payments Razorpay
Email Nodemailer (Gmail SMTP) + Resend
Auth JWT + bcrypt

🚀 Quick Start

Prerequisites

1. Clone & Install

git clone https://github.com/yourusername/codexa.git
cd codexa

# Install backend dependencies
cd backend && npm install

# Install frontend dependencies
cd ../frontend && npm install

2. Configure Environment

# Backend
cd backend
cp .env.example .env
# Edit .env and fill in your values

# Frontend
cd ../frontend
cp .env.example .env.local
# Edit .env.local and fill in your values

3. Set Up Database

cd backend

# Run migrations
npx prisma migrate dev --name init

# Seed initial data (creates admin user, sample blog posts)
npx prisma db seed

4. Generate Admin Password Hash

node -e "const b=require('bcrypt');b.hash('yourpassword',12).then(console.log)"

Add the output to backend/.env as ADMIN_PASSWORD_HASH.

5. Start Development Servers

# Terminal 1 — Backend
cd backend && npm run dev

# Terminal 2 — Frontend
cd frontend && npm run dev

Open http://localhost:3000


🔑 Required API Keys

Service Purpose Free Tier Get It
Groq AI fallback (required) ✅ Free console.groq.com
Supabase Database ✅ Free supabase.com
Upstash Redis cache ✅ Free upstash.com
Anthropic Primary AI ❌ Paid console.anthropic.com
Razorpay Payments ✅ Test mode razorpay.com
Resend Email ✅ Free tier resend.com

Minimum to run: Groq + Supabase + Upstash. Everything else is optional for development.


🔐 Admin Panel

The admin panel is hidden at /adminsetup (configurable via NEXT_PUBLIC_ADMIN_PATH).

Login with:

  • Email: value of ADMIN_EMAIL in backend/.env
  • Password: value of ADMIN_PASSWORD in backend/.env

Features:

  • User management (view, suspend, upgrade plans, delete)
  • Payment history and revenue tracking
  • AI usage analytics
  • Feedback management
  • Site settings (maintenance mode, pricing, announcements)
  • System logs

💳 Payments (Razorpay)

Codexa uses Razorpay instead of Stripe (works in India without business registration).

Test credentials:

  • Card: 4111 1111 1111 1111, any future date, any CVV
  • UPI: success@razorpay
  • Mobile: any 10-digit number

To go live:

  1. Add bank account at razorpay.com → Settings → Bank Account
  2. Generate live keys and update RAZORPAY_KEY_ID + RAZORPAY_KEY_SECRET

📧 Email Setup

Option A — Gmail SMTP (recommended for dev):

  1. Enable 2FA on your Gmail account
  2. Go to myaccount.google.com/apppasswords
  3. Generate an App Password
  4. Set GMAIL_USER and GMAIL_APP_PASSWORD in backend/.env

Option B — Resend:

  • Free tier only delivers to your registered email
  • Add a domain at resend.com/domains to send to anyone

🤖 AI Agents Setup

GitHub Agent

  1. Go to github.com → Settings → Developer Settings → OAuth Apps → New
  2. Set callback URL: http://localhost:4000/api/agents/github/callback
  3. Add GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET to backend/.env

Gmail Agent

  1. Go to console.cloud.google.com
  2. Create OAuth 2.0 credentials
  3. Add callback URL: http://localhost:4000/api/agents/gmail/callback
  4. Enable Gmail API
  5. Add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to backend/.env
  6. Add your email as a test user in OAuth consent screen

🚢 Deployment

Frontend → Vercel

cd frontend && npm run build

Set environment variables in Vercel dashboard (same as .env.local).

Backend → Railway

cd backend && npm run build

Set environment variables in Railway dashboard (same as .env). Update APP_URL and API_URL to your production domains.


📁 Project Structure

codexa/
├── backend/                 # Express.js API
│   ├── src/
│   │   ├── controllers/     # Route handlers
│   │   ├── middleware/      # Auth, rate limiting, etc.
│   │   ├── prompts/         # AI prompt templates
│   │   ├── routes/          # API routes
│   │   └── services/        # AI, email, payments, etc.
│   └── prisma/              # Database schema & migrations
└── frontend/                # Next.js app
    ├── app/                 # App Router pages
    │   ├── (auth)/          # Login, signup, etc.
    │   ├── (dashboard)/     # Protected app pages
    │   ├── (marketing)/     # Public pages
    │   └── adminsetup/      # Hidden admin panel
    ├── components/          # Reusable UI components
    ├── hooks/               # Custom React hooks
    ├── lib/                 # Utilities, axios, etc.
    └── store/               # Zustand state management

📄 License

MIT — free to use, modify, and distribute.


Built with ⚡ by the Codexa team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors