A sleek, modern web hosting platform similar to Vercel/Netlify. Built with Node.js, Express, React, and Tailwind CSS.
- ** File Upload** - Drag & drop file upload for static websites
- ** GitHub Integration** - Clone repositories directly from GitHub
- ** Real-time Monitoring** - CPU, memory, and system statistics
- ** Auto-serving** - Sites automatically served at
/sites/[site-name] - ** Responsive Design** - Works perfectly on desktop and mobile
- ** Fast & Lightweight** - Built with Vite for optimal performance
- ** Notifications** - Toast notifications for all actions
- ** Site Management** - Delete, view, and manage hosted sites
- Node.js 18+
- npm or yarn
- Git (for GitHub cloning feature)
-
Clone the repository
git clone https://github.com/RusilKoirala/hostly/ cd hostly -
Install all dependencies
npm run install:all
-
Start the development servers
npm run dev
This will start both the backend server (port 3001) and frontend development server (port 5173).
If you prefer to run servers separately:
Backend (Server)
cd server
npm install
npm run devFrontend (Client)
cd client
npm install
npm run devhostly/
├── server/ # Backend API (Express.js)
│ ├── index.js # Main server file
│ └── package.json # Server dependencies
├── client/ # Frontend (React + Vite)
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── App.jsx # Main app component
│ │ └── index.css # Global styles
│ └── package.json # Client dependencies
├── sites/ # Hosted websites storage
└── package.json # Root package.json
-
Navigate to the Upload tab
-
Choose upload method:
- File Upload: Drag & drop your website files
- GitHub Clone: Enter a GitHub repository URL
-
Enter a site name (this becomes your URL path)
-
Upload/Clone your site
-
Access your site at
http://localhost:3001/sites/[site-name]
- Dashboard: Overview of all sites and system stats
- Sites: Detailed view of all hosted sites with management options
- System: Real-time CPU and memory monitoring
- HTML files (
.html,.htm) - CSS files (
.css) - JavaScript files (
.js) - Images (
.png,.jpg,.jpeg,.gif,.svg,.ico) - Fonts (
.woff,.woff2,.ttf,.eot) - Other web assets (
.json,.txt,.md,.pdf)
Create a .env file in the server directory:
PORT=3001
NODE_ENV=developmentThe UI uses Tailwind CSS with custom colors defined in client/tailwind.config.js. You can modify:
- Color scheme in the
colorssection - Fonts in the
fontFamilysection - Animations in the
animationsection
Root Directory:
npm run dev- Start both frontend and backendnpm run install:all- Install all dependenciesnpm run build- Build the frontend for production
Server Directory:
npm run dev- Start server with nodemonnpm start- Start server in production mode
Client Directory:
npm run dev- Start Vite development servernpm run build- Build for productionnpm run preview- Preview production build
GET /api/sites- Get all hosted sitesPOST /api/sites/upload- Upload site filesPOST /api/sites/clone- Clone GitHub repositoryDELETE /api/sites/:siteName- Delete a siteGET /api/system/stats- Get system statisticsGET /sites/:siteName- Serve a hosted site
The application includes several reusable components:
- Sidebar - Navigation with modern styling
- Dashboard - Overview cards and statistics
- Sites - Site management with grid layout
- Upload - File upload with drag & drop
- System - Real-time system monitoring
- File type validation for uploads
- CORS configuration
- Helmet.js for security headers
- Input sanitization
- Error handling middleware
-
Build the frontend:
cd client npm run build -
Start the production server:
cd server npm start
Create a Dockerfile in the root directory:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm run install:all
COPY . .
EXPOSE 3001
CMD ["npm", "start"]- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.
- Inspired by Vercel and Netlify
- UI design inspired by Cursor.com
- Built with modern web technologies
- Icons from Lucide React
**Happy Hosting! **