A powerful web-based React component development platform with live code editing and real-time preview
- Overview
- Key Features
- Technology Stack
- Project Structure
- Installation & Setup
- Environment Configuration
- Usage
- API Endpoints
- Available Scripts
- Contributing
- License
ReactBuilder is a comprehensive web-based platform designed for developers to rapidly prototype, build, and manage React components with an intuitive visual interface. It combines the power of code editing with real-time preview capabilities, making React development faster and more efficient.
The platform features a full-stack architecture with user authentication, project management, and a live code editor powered by Monaco Editor. Whether you're building UI components, experimenting with React patterns, or managing multiple projects, ReactBuilder provides all the tools you need in one place.
- Monaco Editor Integration: Professional-grade code editing experience
- Real-time Preview: See your changes instantly with react-live
- Syntax Highlighting: Full JSX/JavaScript syntax support
- Split-pane Interface: Code and preview side-by-side
- Multiple Projects: Organize components into separate projects
- Component Library: Pre-built UI components ready to use
- CRUD Operations: Create, read, update, and delete projects and components
- Search & Filter: Quickly find components across all projects
- Bookmark Components: Mark frequently used components as favorites
- Quick Access: Dedicated favorites page for easy retrieval
- Toggle Functionality: One-click favorite/unfavorite
- JWT-based Authentication: Secure token-based auth system
- Cookie Support: HTTP-only cookies for enhanced security
- Password Hashing: bcrypt encryption for user passwords
- Protected Routes: Middleware-based route protection
- Dark/Light Mode: Full theme support with system preference detection
- Responsive Design: Works seamlessly on all device sizes
- shadcn/ui Components: Beautiful, accessible UI components
- Tailwind CSS: Utility-first styling for rapid development
- Framer Motion: Smooth animations and transitions
- Profile Customization: Update username, email, and avatar
- Password Management: Secure password change functionality
- Visibility Settings: Control profile visibility (public/private)
| Technology | Version | Purpose |
|---|---|---|
| React | 18.3.1 | UI Framework |
| Vite | 5.4.8 | Build Tool & Dev Server |
| React Router | 6.27.0 | Client-side Routing |
| Tailwind CSS | 3.4.14 | Styling Framework |
| shadcn/ui | Latest | UI Component Library |
| Monaco Editor | 4.6.0 | Code Editor |
| react-live | 4.1.7 | Live Code Preview |
| Framer Motion | 11.11.9 | Animations |
| Axios | 1.7.7 | HTTP Client |
| Lucide React | 0.453.0 | Icon Library |
| Zod | 3.23.8 | Schema Validation |
| React Hook Form | 7.53.1 | Form Management |
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 20.x | Runtime Environment |
| Express | 4.21.1 | Web Framework |
| MongoDB | 6.10.0 | Database Driver |
| Mongoose | 8.8.0 | ODM (Object Data Modeling) |
| JWT | 9.0.2 | Authentication Tokens |
| bcryptjs | 2.4.3 | Password Hashing |
| CORS | 2.8.5 | Cross-Origin Resource Sharing |
| dotenv | 16.4.5 | Environment Variables |
| cookie-parser | 1.4.7 | Cookie Parsing |
REACT_BUILDER/
βββ api/ # Backend API
β βββ controllers/ # Request handlers
β β βββ auth.controller.js # Authentication logic
β β βββ component.controller.js
β β βββ profile.controller.js
β β βββ project.controller.js
β βββ models/ # MongoDB schemas
β β βββ user.model.js
β β βββ project.model.js
β βββ routes/ # API routes
β β βββ auth.route.js
β β βββ component.route.js
β β βββ profile.route.js
β β βββ project.route.js
β βββ utils/ # Utility functions
β β βββ error.js
β β βββ verifyUser.js
β βββ index.js # Server entry point
βββ client/ # Frontend application
β βββ public/ # Static assets
β β βββ Dark.png
β β βββ Light.png
β βββ src/
β β βββ components/ # React components
β β β βββ dashboard/ # Dashboard components
β β β βββ theme/ # Theme provider
β β β βββ ui/ # shadcn/ui components
β β βββ pages/ # Page components
β β β βββ Home.jsx
β β β βββ Dashboard.jsx
β β β βββ EditorPage.jsx
β β β βββ Projects.jsx
β β β βββ Components.jsx
β β β βββ Favorites.jsx
β β β βββ Profile.jsx
β β β βββ Settings.jsx
β β β βββ SignIn.jsx
β β β βββ SignUp.jsx
β β βββ lib/ # Utility libraries
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β β βββ index.css # Global styles
β βββ vite.config.js # Vite configuration
β βββ tailwind.config.js # Tailwind configuration
β βββ package.json # Frontend dependencies
βββ .env # Environment variables
βββ package.json # Backend dependencies
βββ README.md # This file
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm or yarn package manager
- MongoDB Atlas account (or local MongoDB instance)
- Git for version control
git clone https://github.com/yourusername/react-builder.git
cd react-buildernpm installcd client
npm install
cd ..Create a .env file in the root directory:
touch .envAdd the following environment variables (see Environment Configuration for details):
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=5000
NODE_ENV=developmentOption 1: Run Backend and Frontend Separately
Terminal 1 (Backend):
npm run devTerminal 2 (Frontend):
cd client
npm run devOption 2: Run Both Concurrently (if configured)
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
-
Create a MongoDB Atlas Account
- Visit MongoDB Atlas
- Sign up for a free account
-
Create a New Cluster
- Click "Build a Cluster"
- Choose the free tier (M0)
- Select your preferred cloud provider and region
-
Configure Database Access
- Go to "Database Access" in the left sidebar
- Click "Add New Database User"
- Create a username and password
- Grant "Read and Write to any database" permissions
-
Configure Network Access
- Go to "Network Access" in the left sidebar
- Click "Add IP Address"
- For development: Add
0.0.0.0/0(allows access from anywhere) - For production: Add your specific IP addresses
-
Get Connection String
- Go to "Clusters" and click "Connect"
- Choose "Connect your application"
- Copy the connection string
- Replace
<password>with your database user password - Replace
<dbname>with your database name (e.g.,reactbuilder)
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/dbname?retryWrites=true&w=majority |
JWT_SECRET |
Secret key for JWT token signing | your_super_secret_key_here_min_32_chars |
PORT |
Backend server port | 5000 |
NODE_ENV |
Environment mode | development or production |
- Never commit
.envfile to version control (it's already in.gitignore) - Use strong JWT secrets (minimum 32 characters, random string)
- URL-encode special characters in MongoDB password:
@β%40!β%21#β%23$β%24
MONGODB_URI=mongodb+srv://reactbuilder:MyP%40ssw0rd@cluster0.mongodb.net/reactbuilder?retryWrites=true&w=majority&appName=ReactBuilder
JWT_SECRET=8B$z&fLmN2!gR@X8dC6vPfZkQ3sT^y9W1xK4mP7qL5nH3jF6
PORT=5000
NODE_ENV=development- Sign Up: Create a new account at
/sign-up - Sign In: Log in with your credentials at
/sign-in - Dashboard: Access your dashboard at
/dashboard - Create Project: Click "New Project" to create your first project
- Add Components: Within a project, add new React components
- Live Editing: Use the Monaco editor to write code with live preview
- Favorites: Mark important components as favorites for quick access
- Navigate to a project
- Click "New Component"
- Enter component name
- Write your React code in the editor
- See live preview on the right panel
- Save your component
function MyButton() {
const [count, setCount] = React.useState(0);
return (
<button
onClick={() => setCount(count + 1)}
className="px-4 py-2 bg-blue-500 text-white rounded"
>
Clicked {count} times
</button>
);
}| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/auth/signup |
Register new user | β |
| POST | /api/auth/signin |
Login user | β |
| POST | /api/auth/signout |
Logout user | β |
| POST | /api/auth/google |
Google OAuth | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/profile |
Get user profile | β |
| PUT | /api/profile |
Update profile | β |
| PUT | /api/profile/password |
Change password | β |
| PUT | /api/profile/visibility |
Update visibility | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/projects |
Get all projects | β |
| POST | /api/projects |
Create new project | β |
| GET | /api/projects/:id |
Get project by ID | β |
| PUT | /api/projects/:id |
Update project | β |
| DELETE | /api/projects/:id |
Delete project | β |
| GET | /api/projects/components |
Get all components | β |
| GET | /api/projects/favorites |
Get favorite components | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/projects/:projectId/components |
Get all components in project | β |
| POST | /api/projects/:projectId/components |
Create new component | β |
| GET | /api/projects/:projectId/components/:componentId |
Get component by ID | β |
| PUT | /api/projects/:projectId/components/:componentId |
Update component | β |
| DELETE | /api/projects/:projectId/components/:componentId |
Delete component | β |
| PUT | /api/projects/:projectId/components/:componentId/favorite |
Toggle favorite | β |
# Start development server with nodemon (auto-reload)
npm run dev
# Start production server
npm start
# Build entire application (backend + frontend)
npm run build# Navigate to client directory first
cd client
# Start Vite development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run ESLint
npm run lintWe welcome contributions to ReactBuilder! Here's how you can help:
- Fork the repository
- Create a 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
- Follow the existing code style
- Write meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
If you find a bug or have a feature request:
- Check if the issue already exists
- Create a new issue with detailed description
- Include steps to reproduce (for bugs)
- Add screenshots if applicable
For issues, questions, or contributions, please open an issue in the repository.
Made with β€οΈ by KARTHIK-004
β Star this repo if you find it helpful!

