Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nexcode-project/nexcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

208 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NexCode

NexCode Logo

Intelligent AI Coding Assistant & Collaboration Platform

A LLM-powered toolkit to augment the end-to-end software engineering workflow for teams.

License Python Node.js FastAPI React

๐ŸŒŸ Core Features

๐Ÿค– AI-Powered Coding Assistance

  • Intelligent code review: detect potential bugs, security risks, and performance issues
  • Commit message generation: produce standard, high-quality commit messages
  • Code quality checks: comprehensive static quality analysis and suggestions
  • Smart Q&A: development-oriented Q&A with context awareness

๐Ÿ”ง Multi-Client Collaboration

  • CLI: powerful terminal tooling integrated with Git workflow
  • Web collaborative docs: real-time co-editing for develop documents
  • Admin Console: full system management and monitoring

๐Ÿ” Enterprise-Grade Capabilities

  • Multi-auth support: username/password, CAS SSO, JWT
  • Role-based access control: fine-grained permissions
  • Analytics & insights: usage stats and trends
  • System health monitoring: real-time status

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   nexcode_cli   โ”‚  โ”‚   nexcode_web   โ”‚  โ”‚  nexcode_admin  โ”‚
โ”‚ (Command Line)  โ”‚  โ”‚   (Web UI)      โ”‚  โ”‚  (Admin Panel)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚                    โ”‚                    โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚ nexcode_server  โ”‚
                    โ”‚  (FastAPI)      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  DB & LLMs      โ”‚
                    โ”‚ (SQLite/OpenAI) โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Option A: Docker Compose (Recommended)

# 1) Clone the project
git clone https://github.com/your-org/nexcode.git
cd nexcode

# 2) Start all services
cd docker
docker-compose up -d

# 3) Access services
# Web:       http://localhost:3000
# Admin:     http://localhost:5433
# API Docs:  http://localhost:8000/docs

Option B: Local Development

Expand detailed steps

1) Backend (FastAPI)

cd nexcode_server
pip install -r requirements_server.txt

# Initialize DB
python scripts/init_db.py

# Start server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

2) Web App (optional)

cd nexcode_web
npm install
npm run dev
# Visit: http://localhost:3000

3) Admin Console (optional)

cd nexcode_admin
npm install
npm run dev
# Visit: http://localhost:5433

4) CLI

cd nexcode_cli
pip install -e .

# Configure CLI
nexcode config set api_server.url "http://localhost:8000"
nexcode config set openai.api_key "your-openai-api-key"

๐Ÿ’ป Usage Guide

๐Ÿ–ฅ๏ธ CLI (Developer Recommended)

# Code quality checks
nexcode check                          # check current changes
nexcode check --files src/main.py      # check specific files

# Smart commits
nexcode commit                         # generate and commit
nexcode commit --dry-run               # preview commit message

# Intelligent Q&A
nexcode ask "How to optimize this function?" --files src/utils.py
nexcode ask "Difference between Git rebase and merge?"

# Git error diagnosis
nexcode diagnose                       # diagnose the last Git error

# Push strategy
nexcode push                           # get smart push suggestions
nexcode push --dry-run                 # preview push plan

# Repository analysis
nexcode analyze --type overview        # project overview
nexcode analyze --type structure       # structure analysis
nexcode analyze --type dependencies    # dependency analysis

๐ŸŒ Web UI

Visit http://localhost:3000 with default accounts:

  • Demo: demo / demo123
  • Admin: admin / admin123

Key features:

  • Dual-mode AI chat: built-in assistant + OpenAI GPT
  • Runtime tunables: switch model, temperature, max tokens
  • Contextual conversation: multi-turn with history
  • Responsive design: desktop and mobile friendly

๐Ÿ› ๏ธ Admin Console

Visit http://localhost:5433

Highlights:

  • System dashboard: status, performance, resource usage
  • User management: accounts, roles, API keys
  • Analytics: commit stats, quality trends, user activity
  • System settings: global configs, CAS, security
  • API monitoring: usage stats, latency, errors

๐Ÿ”Œ OpenAI API Compatible

import openai

# Use NexCode as a drop-in replacement
client = openai.OpenAI(
    api_key="your-openai-api-key",
    base_url="http://localhost:8000/v1"
)

response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "Hello, NexCode!"}]
)

๐Ÿ“‹ Feature Matrix

โœ… Implemented

  • Code Review based on Git diff
  • Commit Message Generation
  • Git Error Analysis
  • Code Quality Check
  • Intelligent Q&A (Git, code, workflow)
  • Push Strategy Analysis
  • Repository Analysis
  • CLI, Web Chat UI, Admin Panel, Responsive UI
  • Auth (multi-methods), RBAC, Usage Analytics
  • OpenAI Compatibility Layer, Dockerized deployment

๐Ÿ”ง Configuration Management

  • Environment variables
  • CLI config system (local & global)
  • TOML-based prompt templates
  • Multiple model providers (OpenAI, Azure OpenAI, ...)

๐Ÿšง Roadmap

๐ŸŽฏ Near-term (v1.3.0)

  • Real repository analysis (read & analyze project files)

  • RAG Q&A over repository content

  • Context-aware code review with project history

  • Intelligent code completion

  • Test generation (nexcode test)

  • Doc generation (nexcode doc)

  • Code scaffolding (nexcode generate)

  • Refactoring assistant (nexcode refactor)

  • Dependency vulnerability scanning

  • Secrets scanning (nexcode scan:secrets)

  • Coverage reporting

  • Performance profiling

๐Ÿ”ฎ Mid-term (v1.4.0)

  • GitHub App for PR reviews

  • GitLab integration (webhooks)

  • Jenkins plugin (CI/CD)

  • Automation workflows (rule-based)

  • Collaborative code review

  • Team knowledge base

  • Linting / style enforcement

  • Technical debt tracking

  • Code complexity metrics

  • Architecture dependency analysis

  • Code evolution & hotspots

  • Developer productivity metrics

๐ŸŒŸ Long-term (v2.0.0)

  • Multimodal understanding (images, diagrams)

  • Natural language programming for complex tasks

  • Smart debugging based on error traces

  • Automated refactoring

  • Plugin system

  • IDE integrations (VSCode, JetBrains)

  • Cloud/SaaS offering

  • Enterprise-scale deployment

๐Ÿ“Š Tech Stack

Backend

  • FastAPI (Python)
  • SQLAlchemy, Alembic, Pydantic
  • PostgreSQL/SQLite

Frontend

  • Next.js 14, React 18, TypeScript
  • Tailwind CSS, Zustand, Framer Motion

CLI

  • Click, GitPython, Rich, PyYAML

AI & Integration

  • OpenAI API, LangChain, Tiktoken, Jinja2

๐Ÿ”ง Configuration

Environment variables (examples):

# OpenAI settings
OPENAI_API_KEY=sk-...
OPENAI_API_BASE=https://api.openai.com/v1
OPENAI_MODEL=gpt-3.5-turbo

# Database
DATABASE_URL=sqlite:///./nexcode.db

# Server
HOST=0.0.0.0
PORT=8000
DEBUG=false

# Auth
REQUIRE_AUTH=false
JWT_SECRET_KEY=your-secret-key
CAS_SERVER_URL=https://cas.example.com

CLI config:

# View configs
nexcode config list
nexcode config get openai.api_key

# Set configs
nexcode config set openai.api_key "sk-..."
nexcode config set api_server.url "http://localhost:8000"
nexcode config set model.temperature 0.7

# Reset configs
nexcode config reset

๐Ÿš€ Deployment

Docker (Recommended)

# 1) Clone
git clone https://github.com/your-org/nexcode.git
cd nexcode

# 2) Env
cp docker/.env.example docker/.env
# edit docker/.env

# 3) Start
cd docker
docker-compose up -d

# 4) Status
docker-compose ps
docker-compose logs -f

Manual Deployment

Expand detailed steps

Backend:

cd nexcode_server
pip install -r requirements_server.txt

# Env
export OPENAI_API_KEY="your-key"
export DATABASE_URL="postgresql://user:pass@localhost/nexcode"

# Init DB
python scripts/init_db.py

# Run
uvicorn app.main:app --host 0.0.0.0 --port 8000

Web:

cd nexcode_web
npm install
npm run build
# serve the build with nginx or any static server

Admin:

cd nexcode_admin
npm install
npm run build
# serve the build with a static server

๐Ÿ” Monitoring & Logs

Health checks:

curl http://localhost:8000/health
curl http://localhost:8000/health/detailed

Logs:

docker-compose logs -f nexcode_server
# or a specific time window
docker-compose logs --since="2024-01-01" nexcode_server

๐Ÿค Contributing

We welcome all kinds of contributions!

Workflow:

  1. Fork the repo
  2. Create a branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'feat: add amazing feature'
  4. Push branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Guidelines:

  • Follow existing code style
  • Add appropriate test coverage
  • Update relevant docs
  • Use Conventional Commits

๐Ÿ“„ License

Apache License. See LICENSE.

๐Ÿ™ Acknowledgements

Thanks to these awesome projects and communities:

  • OpenAI โ€” LLM capabilities
  • FastAPI โ€” high-performance web framework
  • Next.js โ€” excellent React framework
  • Click โ€” Python CLI framework
  • Ant Design โ€” enterprise-grade UI components

๐Ÿ“ž Contact


NexCode Team โ€” Empower every line of code with AI

โญ If you find this project helpful, please give us a star!

About

An ai create commits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •