A customizable and extensible website builder that allows you to create a professional portfolio or personal website with ease. Configure your site using simple JSON files, choose from multiple design themes, and deploy it effortlessly.
- Easy Configuration: Customize your website using simple JSON files.
- Multiple Design Themes: Choose from various pre-built themes to match your style.
- Dynamic Content: Fetches GitHub repositories and Twitch stats to display on your site.
- Contact Form: Integrated contact form with email notifications.
- Blog Support: Write blog posts in Markdown.
- File Uploads: Support for uploading files with configurable storage.
- Responsive Design: Mobile-friendly layouts using modern CSS practices.
Follow these instructions to get a copy of the project up and running on your local machine.
- Node.js (v14 or higher)
- npm (v6 or higher)
-
Clone the repository
git clone https://github.com/cptcr/website-builder.git
-
Navigate to the project directory
cd website-builder
-
Install dependencies
npm install
The application uses JSON files for configuration. You can generate these files using the interactive setup script.
-
Run the setup script
npm run setup
-
Follow the prompts
The script will ask for various details such as site name, GitHub username, design selection, API tokens, personal information, etc.
-
Configuration files generated
config/config.json
: Main configuration file.config/mail.config.json
: Mail server configuration for the contact form.
Choose from the following design themes during setup:
- default: Default design with a balanced and classic look.
- midnight: A sleek dark theme with deep blues and purples.
- sunset: Warm and vibrant colors inspired by a sunset.
- caprihan: Cool blues and greens inspired by the island of Capri.
- ocean: An oceanic theme featuring teals and deep blues.
To start the application, use one of the following commands:
-
Production Mode
npm start
-
Development Mode (with nodemon for automatic restarts)
npm run dev
The server will start on the port specified in your config.json
(default is 3000
).
-
Setup
Runs the interactive configuration script.
npm run setup
-
Start
Starts the server in production mode.
npm start
-
Dev
Starts the server in development mode with nodemon.
npm run dev
-
Test
Placeholder for running tests.
npm test
website-builder/
├── config/
│ ├── config.json # Main configuration file
│ └── mail.config.json # Mail server configuration
├── public/
│ ├── styles/ # CSS files for different themes
│ ├── uploads/ # Uploaded files
│ └── ... # Static assets
├── src/
│ ├── functions/
│ │ ├── fetch-repos.js # Function to fetch GitHub repos
│ │ └── fetch-twitch-stats.js # Function to fetch Twitch stats
│ ├── markdown/ # Blog posts in Markdown format
│ └── views/ # EJS templates
├── .gitignore
├── index.js # Main application file
├── package.json
├── README.md
└── setup.js # Interactive setup script
Contributions are welcome! Please follow these steps:
-
Fork the repository
-
Create a new branch
git checkout -b feature/your-feature-name
-
Commit your changes
git commit -m "Add your message here"
-
Push to the branch
git push origin feature/your-feature-name
-
Open a Pull Request
This project is licensed under the MIT License.
Note: Remember to replace placeholders like your_github_api_token
, your_twitch_oauth_token
, and your_twitch_client_id
with your actual API tokens in the configuration files. Keep these tokens secure and do not share them publicly.