🍭 Your CandyPack Site is Ready!
You've successfully created a new website with CandyPack
This is your starting template. Edit the files in your project directory to customize your site. Everything you need to build a modern web application is already set up and ready to go.
📁 Your Project Structure
Here's what you'll find in your project directory:
controller/
Your application logic lives here. Each file handles requests and prepares data for views.
controller/page/index.js
view/
HTML templates for your pages. Organized by type (content, header, footer).
view/content/home.html
route/
Define your URL routes here. Map URLs to controllers and views.
route/www.js
public/
Static assets like CSS, JavaScript, and images. Served directly to browsers.
public/assets/css/style.css
skeleton/
Page layouts that wrap your content. Define your HTML structure once.
skeleton/main.html
config.json
Configuration file for database, routes, and other settings.
config.json
🚀 Quick Start Guide
Edit Your Content
Open view/content/home.html to customize this page. All your HTML templates are in the view/ directory.
Add Routes
Define new pages in route/www.js. Map URLs to controllers:
Candy.Route.page('/my-page', 'page.mypage')
Create Controllers
Add logic in controller/page/mypage.js:
module.exports = function(Candy) {
Candy.View.skeleton('main')
Candy.View.set({
header: 'main',
content: 'mypage',
footer: 'main'
})
}
Style Your Site
Customize the look in public/assets/css/style.css. Add your own CSS or use your favorite framework.
✨ What's Included
AJAX Navigation
Smooth page transitions without full reloads. Already configured in public/assets/js/app.js
CSRF Protection
Automatic security tokens for all forms and AJAX requests. No configuration needed.
Responsive Design
Mobile-first CSS framework included. Customize in public/assets/css/style.css
Fast Development
Hot reload enabled. Changes to views and controllers are reflected immediately.
Database Ready
MySQL and SQLite support built-in. Configure in config.json
Email Support
Send emails with the built-in mail service. SMTP and IMAP included.