Package Exports
- ucg
- ucg/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ucg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
UCG (Universal CRUD Generator)
A powerful CLI tool like Yii2's GII for generating Express.js APIs. UCG provides a beautiful web-based GUI for managing your project with setup, authentication, and dashboard screens.
✨ Features
Phase 1 (✅ COMPLETE - Modular Architecture)
- 🚀 Quick Project Setup - Creates Express.js projects instantly
- 🎨 Beautiful Web GUI - Modern setup, login, and dashboard pages
- 🔐 Complete Authentication - JWT tokens, bcrypt hashing, secure sessions
- 📊 Multi-Database Support - PostgreSQL, MySQL, SQLite, MongoDB
- ⚙️ ORM Integration - Prisma, Sequelize, Mongoose support
- 🏗️ Modular Architecture - Clean separation of concerns
Phase 2 (🚧 Coming Soon)
- 🏗️ CRUD generator for rapid API development
- 📝 Auto-generated API documentation
- 🔄 Database migrations and seeding
- ⚡ Advanced validation and middleware
Installation
Global Installation
npm install -g ucgQuick Start
# Create a new project
npx ucg quick-setup my-api-project
# Or install in existing project
cd my-existing-project
npx ucg init🚀 Usage
Creating a New Project
ucg quick-setup my-api-project
cd my-api-project
npm start
# Visit http://localhost:3000/ucg for the beautiful web interfaceAdding UCG to Existing Project
cd my-existing-project
ucg init
npm start
# Visit http://localhost:3000/ucg/setup to configure🏗️ Architecture
Built-in GUI System
UCG provides its own beautiful web interface with three main screens:
📋 Setup Page (
/ucg/setup)- Database configuration (PostgreSQL, MySQL, SQLite, MongoDB)
- ORM selection (Prisma, Sequelize, Mongoose)
- Admin account creation
- Modern, responsive UI with real-time validation
🔐 Login Page (
/ucg/login)- Secure JWT authentication
- bcrypt password hashing
- Session management with secure cookies
📊 Dashboard (
/ucg/dashboard)- Project overview and statistics
- Configuration management
- Phase 2 feature previews
- Modern admin interface
Modular Controller Architecture
ucg/
├── controllers/ # UCG's built-in GUI controllers
│ ├── setup-controller.js # Setup flow management
│ ├── auth-controller.js # Authentication system
│ └── dashboard-controller.js # Admin dashboard
└── routes/index.js # Route definitions with middlewareDatabase Operations
# Run migrations (Phase 2)
ucg migrate
# Seed database (Phase 2)
ucg seedAccessing the Dashboard
After initialization, start your server and visit:
http://localhost:3000/ucgCommands
ucg quick-setup <project-name>- Create new project with UCGucg init- Initialize UCG in existing projectucg migrate- Run database migrations (Coming in Phase 2)ucg seed- Seed database with initial data (Coming in Phase 2)
Supported Technologies
- Backend: Express.js + TypeScript
- ORMs: Prisma (default), Mongoose, Sequelize
- Databases: PostgreSQL, MySQL, SQLite, MongoDB
- Authentication: JWT + bcrypt
- Validation: Zod
- Documentation: Swagger/OpenAPI
- Testing: Jest + Supertest
Project Structure
After initialization, UCG creates:
my-project/
├── app.js # Express server
├── ucg/ # UCG dashboard & routes
│ ├── routes/ # UCG routing
│ └── controllers/ # UCG controllers
├── ucg-config.js # Configuration helper
├── .ucg-config.json # UCG settings
└── .env # Environment variablesConfiguration
UCG uses .ucg-config.json for storing project settings:
{
"project": {
"name": "my-api",
"database": {
"type": "postgres",
"host": "localhost",
"port": 5432,
"database": "myapp"
},
"orm": "prisma"
},
"isSetupComplete": true
}Development
Building from Source
git clone https://github.com/ucg/ucg
cd ucg
npm install
npm run build
npm linkRunning Tests
npm testRoadmap
Phase 1 (Current)
- ✅ CLI framework with Oclif
- ✅ Project initialization
- ✅ Web dashboard setup
- ✅ Database configuration
Phase 2 (Coming Soon)
- 🔄 Database migrations
- 🔄 CRUD generators
- 🔄 Authentication system
- 🔄 API documentation
Phase 3 (Future)
- 🔄 Advanced generators
- 🔄 Plugin system
- 🔄 Cloud deployment
- 🔄 Team collaboration
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
MIT License - see LICENSE file for details.
Support
Made with ❤️ by the UCG Team