A modern static site hosting platform with file management and real-time deployment. Statix is THE open-source alternative to Netlify.
- Static site management: Easily upload and manage your HTML/CSS/JS sites
- Multilingual interface: Support for French and English (real-time language switching)
- Intuitive dashboard: View your sites, statistics, and files at a glance
- Instant deployment: Your sites are accessible immediately after upload
- Subdomain routing: Access your sites via
slug.lvh.me:3000or/sites/id/ - Configurable main file: Choose which HTML file to serve by default
- Secure authentication: Login/register system with JWT
- File management: Upload, delete, and organize your files
- React 18 with TypeScript
- Vite for build and dev server
- Tailwind CSS for styling
- shadcn/ui for UI components
- Zustand for state management
- i18next for internationalization
- Framer Motion for animations
- Express.js for REST API
- SQLite for database
- Multer for file uploads
- JWT for authentication
- bcrypt for password hashing
- Node.js 18+ and npm
- Git
# Clone the repository
git clone https://github.com/luoxthedev/static-site-host.git
cd static-site-host
# Install frontend dependencies
npm install
# Install backend dependencies
cd server
npm install
cd ..# From the root folder, start the backend
npm run server
# In another terminal, start the frontend
npm run devBackend (port 3000):
cd server
npm startFrontend (port 8080):
npm run dev- Frontend: http://localhost:8080
- Backend API: http://localhost:3000
- Deployed sites:
- By ID: http://localhost:3000/sites/[site-id]/
- By subdomain: http://[slug].lvh.me:3000/
Create a .env file in the server/ folder:
PORT=3000
JWT_SECRET=your_jwt_secret_here
SITES_ROOT=uploadsModify server/config.js to customize:
module.exports = {
appDomain: 'lvh.me', // Domain for subdomains
port: 3000, // Server port
sitesRoot: 'uploads', // Sites storage folder
enableSubdomains: true // Enable subdomain routing
};.
├── src/ # Frontend source code
│ ├── components/ # React components
│ ├── pages/ # Application pages
│ ├── stores/ # State management (Zustand)
│ ├── locales/ # Translation files (FR/EN)
│ └── lib/ # Utilities
├── server/ # Backend source code
│ ├── routes/ # Express routes
│ ├── middleware/ # Middleware (auth, etc.)
│ ├── utils/ # Backend utilities
│ ├── uploads/ # Hosted sites
│ ├── database.js # SQLite configuration
│ └── index.js # Backend entry point
└── public/ # Static assets
- Create a new site with name and slug
- Upload files (HTML, CSS, JS, images, etc.)
- Set a custom main file
- Delete files
- Redeploy a site
- Registration with name, email, and password
- Login with JWT
- "Remember me" option
- Forgot password
- Overview of all your sites
- Statistics: number of sites, active sites, storage used
- Site search and filtering
- Quick access to each site management
- Switch between French and English
- Real-time language switching
- Language preference persistence
npm run dev # Start the frontend in development mode
npm run build # Build the frontend for production
npm run preview # Preview the production build
npm run server # Start the backendMIT
Developed by luoxthedev