A production-ready, feature-rich starter kit for building modern, responsive web applications
π Live Demo | π Documentation | π Quick Start
- β¨ Features
- π Quick Start
- ποΈ Project Structure
- π― Use Cases
- π οΈ Development
- π¨ Component Library
- π Deployment
- π Content Management
- π§ͺ Testing
- π€ Contributing
- π License
Technology | Purpose | Version |
---|---|---|
Backend Framework | Latest | |
CSS Framework | Latest | |
Template Engine | Latest | |
CSS Preprocessor | Latest | |
Runtime Environment | 18+ |
- Bootstrap 5.3.7 with latest components and utilities
- 2,000+ Bootstrap Icons for comprehensive iconography
- Dark/Light Mode Toggle with system preference detection
- Responsive Design optimized for all device sizes
- Advanced Component Library with interactive examples
- Hot Reload Development with automatic browser refresh
- SASS Watch Mode for real-time style compilation
- ESLint + Prettier for consistent code formatting
- Jest Testing Suite with coverage reports
- Docker Support for containerized development
- Helmet.js Integration for security headers
- Rate Limiting to prevent abuse
- Compression Middleware for optimized delivery
- Content Security Policy implementation
- Input Validation with sanitization
- Service Worker for offline functionality
- Web App Manifest for installable experience
- Responsive Images with optimized loading
- Performance Metrics tracking
- GitHub Pages Integration with automatic builds
- CI/CD Pipeline with GitHub Actions
- Docker Containerization for consistent deployment
- Static Site Generation for hosting flexibility
- SEO Optimization with structured data
Requirement | Minimum Version | Recommended |
---|---|---|
Node.js | 18.0.0 | Latest LTS |
npm | 9.0.0 | Latest |
Git | 2.28.0 | Latest |
# Clone and setup in one go
npx degit markhazleton/js-dev-env my-awesome-project && cd my-awesome-project && npm install && npm run start:dev
# 1. Clone the repository
git clone https://github.com/markhazleton/js-dev-env.git
cd js-dev-env
# 2. Install dependencies
npm install
# 3. Start development server with hot reload
npm run start:dev
# 4. Open your browser
open http://localhost:3000
# Using Docker Compose (Recommended)
docker-compose up --build
# Or using Docker directly
docker build -t js-dev-env .
docker run -p 3000:3000 js-dev-env
js-dev-env/
βββ π .github/ # GitHub workflows and templates
β βββ workflows/
β β βββ ci.yml # Continuous Integration
β β βββ deploy.yml # GitHub Pages deployment
β βββ ISSUE_TEMPLATE/ # Issue templates
βββ π data/ # Content management
β βββ pages.json # JSON-based CMS
βββ π docs/ # Built static site (auto-generated)
βββ π public/ # Static assets
β βββ css/ # Compiled CSS
β βββ js/ # Client-side JavaScript
β βββ fonts/ # Bootstrap Icons & fonts
β βββ images/ # Image assets
β βββ manifest.json # PWA manifest
β βββ service-worker.js # Offline functionality
βββ π scripts/ # Build and utility scripts
β βββ clean-docs.js # Clean build directory
β βββ copy-icons.js # Bootstrap Icons setup
β βββ copy-static-assets.js # Asset management
β βββ generate-static-site.js # Static site generator
β βββ security-audit.js # Security checks
β βββ dev-helper.js # Development utilities
βββ π scss/ # SASS source files
β βββ _variables.scss # Bootstrap overrides
β βββ _custom.scss # Custom styles
β βββ _components-pages.scss # Component-specific styles
β βββ main.scss # Main stylesheet
βββ π tests/ # Test suite
β βββ app.test.js # Application tests
β βββ setup.js # Test configuration
βββ π utils/ # Utility modules
β βββ cache.js # Caching system
β βββ database.js # Database abstraction
β βββ performance.js # Performance monitoring
β βββ security.js # Security utilities
β βββ json-database.js # JSON database
βββ π views/ # EJS templates
β βββ partials/ # Reusable components
β βββ components.ejs # Basic component library
β βββ advanced-components.ejs # Advanced components
β βββ layout.ejs # Main layout
β βββ page.ejs # Generic page template
β βββ error-404.ejs # Error page
βββ index.js # Main Express server
βββ package.json # Dependencies and scripts
βββ docker-compose.yml # Docker configuration
βββ Dockerfile # Container definition
βββ jest.config.js # Test configuration
βββ eslint.config.mjs # ESLint configuration
βββ README.md # This file
Perfect for rapidly prototyping interfaces with Bootstrap 5 components and custom styling.
Create beautiful documentation with the JSON-based CMS and automatic GitHub Pages deployment.
Build conversion-optimized landing pages with SEO features and performance optimization.
Develop responsive e-commerce interfaces with form validation and security features.
Create installable web applications with offline functionality and responsive design.
Ideal for developers learning modern web development practices and Bootstrap 5.
Script | Purpose | Usage |
---|---|---|
npm run start:dev |
Development server with hot reload | Primary development |
npm run build |
Production build for deployment | Before deployment |
npm test |
Run test suite with Jest | Testing |
npm run lint |
Code linting with ESLint | Code quality |
npm run docker:dev |
Docker development environment | Containerized dev |
# Start development environment
npm run start:dev
# In another terminal, run tests in watch mode
npm run test:watch
# Check code quality
npm run lint
# Build for production
npm run build
Edit scss/_variables.scss
to customize Bootstrap variables:
// Brand Colors
$primary: #007bff;
$secondary: #6c757d;
$success: #28a745;
// Typography
$font-family-base: 'Inter', system-ui, sans-serif;
$font-size-base: 1rem;
// Spacing
$spacer: 1rem;
$border-radius: 0.375rem;
- Create component in
views/partials/
- Add styles in
scss/_custom.scss
- Include in page templates
The starter kit includes two comprehensive component libraries:
- Buttons - All variants, sizes, and states
- Typography - Headings, text utilities, and formatting
- Cards - Various card layouts and styles
- Alerts - All alert types with icons
- Forms - Complete form elements with validation
- Modals - Interactive modal examples
- Tables - Responsive table designs
- Icons - Bootstrap Icons showcase
- Accordion - Collapsible content panels
- Carousel - Image/content sliders with controls
- Offcanvas - Sliding panel navigation
- Tabs & Pills - Tabbed content navigation
- Collapse - Show/hide content functionality
- Dropdowns - Context menus and actions
- Tooltips & Popovers - Interactive help elements
- Progress Bars - Animated progress indicators
- Spinners - Loading state animations
- Badges - Status and notification badges
- Breadcrumbs - Navigation trails
- Pagination - Page navigation controls
Each component includes:
- Live Preview - See components in action
- Copy-Paste Code - Ready-to-use HTML snippets
- Responsive Design - Mobile-optimized layouts
- Accessibility - WCAG compliant implementations
Automatic deployment with every push to main:
# .github/workflows/ci.yml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: npm run build
- uses: peaceiris/actions-gh-pages@v4
π· Vercel
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
π§ Netlify
# netlify.toml
[build]
command = "npm run build"
publish = "docs"
π£ Heroku
# Create Procfile
echo "web: node index.js" > Procfile
# Deploy
git push heroku main
π³ Docker
# Build and run
docker-compose up --build -d
Add new pages by editing data/pages.json
:
{
"title": "New Page",
"url": "/new-page",
"template": "page",
"content": {
"heading": "π Welcome to My New Page",
"text": "This page was created with the JSON-based CMS",
"body": "<div class=\"alert alert-success\">Content goes here!</div>"
}
}
- Route Generation - Pages automatically become accessible
- Navigation Updates - Menu items added automatically
- SEO Optimization - Meta tags generated from content
- Static Site Generation - HTML files created for GitHub Pages
# Run all tests
npm test
# Watch mode for development
npm run test:watch
# Coverage report
npm run test:coverage
# CI/CD tests
npm run test:ci
Tests cover:
- Route handling and page rendering
- Utility functions and helpers
- Security middleware functionality
- API endpoints and responses
- Component rendering and interactions
- ESLint for code quality
- Prettier for formatting
- Jest for unit testing
- Security audits with npm audit
- Performance monitoring built-in
We welcome contributions from developers of all skill levels!
- Fork the repository
- Clone your fork locally
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Use conventional commit messages
- Keep pull requests focused
Look for issues labeled:
good first issue
beginner-friendly
help wanted
documentation
- π Report bugs via GitHub Issues
- π‘ Suggest features via GitHub Discussions
- π¨οΈ Ask questions in the community forum
- π’ Follow updates on releases and announcements
Special thanks to the amazing open-source community and these fantastic projects:
- Bootstrap for the incredible CSS framework
- Express.js for the robust web framework
- Bootstrap Icons for the comprehensive icon library
- GitHub Pages for free hosting
- Jest for the testing framework
This project is licensed under the MIT License - see the LICENSE file for details.
If this project helped you, please consider:
- β Starring the repository
- π΄ Forking for your own projects
- π’ Sharing with the community
- π Reporting bugs and issues
- π‘ Suggesting new features
Built with β€οΈ by Mark Hazleton