A powerful full-stack application that allows users to create custom APIs instantly with intuitive schema design. Built with React (TypeScript) frontend and Go backend.
- Landing Page: Professional marketing page with feature overview
- Authentication: Sign up/Sign in with JWT tokens
- Dashboard: User dashboard with API key management, schema overview, and usage statistics
- Schema Builder: Visual schema designer with drag & drop interface
- Real-time Updates: Live schema management and API testing
- User Management: JWT-based authentication with secure password hashing
- API Key System: Unique API key generation and management for each user
- Dynamic Schema Builder: Create, read, update, delete custom schemas
- Auto-Generated APIs: Automatic CRUD endpoints based on user schemas
- Field-Level Security: Public/private field visibility controls
- Custom Database Support: Connect your own MongoDB instance
- Admin Panel: User management and platform statistics
- CRUD Operations: Full Create, Read, Update, Delete operations
- Field Visibility: Control which fields are visible in GET responses
- Pagination: Built-in pagination for list endpoints
- API Documentation: Auto-generated Swagger docs for each user's APIs
- Usage Tracking: Monitor API usage and implement quotas
- React 19 with TypeScript
- Tailwind CSS for styling
- React Router DOM for navigation
- Axios for API calls
- Lucide React for icons
- Vite for build tooling
- Go 1.21+
- Gin web framework
- MongoDB with official Go driver
- JWT for authentication
- bcrypt for password hashing
- UUID for API key generation
- Node.js (v16 or later)
- Go (v1.21 or later)
- MongoDB (local instance or MongoDB Atlas)
cd SchemaCraft
npm install
npm run devThe frontend will be available at http://localhost:5173
cd BackEnd
go mod tidyCreate a .env file in the BackEnd directory:
PORT=8080
MONGODB_URI=mongodb://localhost:27017
DATABASE_NAME=schemacraft
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
GIN_MODE=debugMongoDB Options:
Install MongoDB locally and run:
mongod --dbpath /path/to/data/directory- Create a free account at MongoDB Atlas
- Create a new cluster
- Get your connection string and update
MONGODB_URIin.env - Example:
MONGODB_URI=mongodb+srv://username:[email protected]
docker run -d --name mongodb -p 27017:27017 mongo:latestcd BackEnd
go run main.goThe backend will be available at http://localhost:8080
Visit http://localhost:5173 to see the landing page with feature overview.
Create a new account - you'll automatically get:
- Unique API key for your APIs
- Access to the dashboard
- 1000 API requests quota per month
In the dashboard:
- Click "Create Schema"
- Define your collection name (e.g., "users", "products")
- Add fields with different types (string, number, boolean, date, object, array)
- Set field visibility (public/private)
- Mark required fields
Once schema is created, you get automatic endpoints:
# Create document
POST http://localhost:8080/api/{collection}
Headers: X-API-Key: your-api-key
# Get all documents
GET http://localhost:8080/api/{collection}?page=1&limit=10
Headers: X-API-Key: your-api-key
# Get document by ID
GET http://localhost:8080/api/{collection}/{id}
Headers: X-API-Key: your-api-key
# Update document
PUT http://localhost:8080/api/{collection}/{id}
Headers: X-API-Key: your-api-key
# Delete document
DELETE http://localhost:8080/api/{collection}/{id}
Headers: X-API-Key: your-api-keyAccess auto-generated Swagger docs at:
http://localhost:8080/docs/{your-api-key}
- JWT Authentication for dashboard access
- API Key Authentication for dynamic APIs
- Password Hashing with bcrypt
- Field-Level Visibility (public/private fields)
- Request Rate Limiting and quota management
- Admin Controls for user management
Access admin panel with an admin user:
- View all registered users
- Monitor API usage statistics
- Activate/deactivate user accounts
- Revoke API keys
- Platform-wide analytics
src/
βββ components/
β βββ auth/ # Authentication pages
β βββ dashboard/ # Dashboard components
β βββ LandingPage.tsx # Marketing landing page
βββ contexts/ # React Context providers
βββ hooks/ # Custom React hooks
βββ services/ # API service layer
βββ App.tsx # Main app component
BackEnd/
βββ config/ # Database configuration
βββ controllers/ # HTTP request handlers
βββ middleware/ # Authentication & CORS middleware
βββ models/ # Data models and structures
βββ routes/ # API route definitions
βββ utils/ # Utility functions
βββ main.go # Application entry point
{
"collection_name": "users",
"fields": [
{
"name": "name",
"type": "string",
"visibility": "public",
"required": true,
"description": "User's full name"
},
{
"name": "email",
"type": "string",
"visibility": "public",
"required": true,
"description": "User's email address"
},
{
"name": "password",
"type": "string",
"visibility": "private",
"required": true,
"description": "User's password (hidden from GET requests)"
},
{
"name": "age",
"type": "number",
"visibility": "public",
"required": false,
"default": 0
}
]
}# Create a new user
curl -X POST http://localhost:8080/api/users \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "[email protected]",
"password": "secret123",
"age": 30
}'
# Get all users (password field will be hidden)
curl -X GET http://localhost:8080/api/users \
-H "X-API-Key: your-api-key-here"For detailed deployment instructions, see BackEnd/DEPLOYMENT.md.
- AWS EC2 instance (Amazon Linux 2 or Ubuntu)
- Domain name (optional)
- GitHub repository
# On your EC2 instance
wget https://raw.githubusercontent.com/M-awais-rasool/SchemaCraft/main/BackEnd/scripts/setup-ec2.sh
chmod +x setup-ec2.sh
./setup-ec2.sh-
Configure GitHub Secrets:
EC2_SSH_KEY: SSH private key for GitHub ActionsEC2_HOST: Your EC2 public IP or domainEC2_USER:ec2-userDEPLOY_PATH:/opt/schemacraft
-
Push to
mainbranch - automatic deployment via GitHub Actions!
cd /opt/schemacraft/BackEnd
./scripts/deploy.shcd BackEnd
./scripts/dev-start.shcd SchemaCraft
npm run build
# Deploy the 'dist' folderPORT=8080
MONGODB_URI=your-production-mongodb-uri
DATABASE_NAME=schemacraft_prod
JWT_SECRET=your-super-secure-production-jwt-secret
GIN_MODE=release- β Docker containerization
- β Nginx reverse proxy
- β SSL/TLS support (Let's Encrypt)
- β Auto-scaling ready
- β Health checks
- β Log management
- β Database optimization
- β CI/CD pipeline
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For support, email [email protected] or create an issue in the repository.
Built with β€οΈ by the SchemaCraft team