Panduan komprehensif untuk setup semua tech-stack yang tersedia, dari instalasi hingga production deployment.
# Buat project baru
npx create-react-app my-app
cd my-app
# Install dependencies jika download template
npm install
# Jalankan development server
npm start
# Akses: http://localhost:3000
src/
βββ components/ # Reusable components
βββ pages/ # Page components
βββ styles/ # CSS files
βββ utils/ # Helper functions
βββ App.jsx # Main component
βββ index.jsx # Entry point
.env file:
REACT_APP_API_URL=http://localhost:3000
REACT_APP_NAME=MyApp
β οΈ Note: Environment variables harus dimulai dengan REACT_APP_
npm install react-router-dom axios
npm install -D tailwindcss
npm run build
# Output: folder "build"
# Test production build
npm install -g serve
serve -s build
npm install -g vercel && vercelnpm install --save-dev gh-pages# Buat project baru (recommended)
npx create-next-app@latest my-nextjs-app
cd my-nextjs-app
# Atau dengan template yang didownload
npm install
# Jalankan development server
npm run dev
# Akses: http://localhost:3000
app/
βββ layout.jsx # Root layout
βββ page.jsx # Home page (/)
βββ api/
β βββ route.js # API endpoint
βββ blog/
βββ [slug]/
β βββ page.jsx # Dynamic route
components/ # Reusable components
lib/ # Helper functions
public/ # Static files
.env.local)NEXT_PUBLIC_API_URL=http://localhost:3000
DATABASE_URL=postgresql://...
API_SECRET_KEY=secret_key
Note: NEXT_PUBLIC_ = client-side, tanpa prefix = server-side
# Prisma ORM
npm install @prisma/client
npm install -D prisma
npx prisma init
# NextAuth untuk authentication
npm install next-auth
npm run build
npm run start
vercel atau push ke GitHubnpm run build# Install Laravel Installer
composer global require laravel/installer
# Buat project baru
laravel new my-laravel-app
cd my-laravel-app
# Atau dengan template yang didownload
composer install
php artisan key:generate
php artisan serve
# Akses: http://localhost:8000
.env)DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_db
DB_USERNAME=root
DB_PASSWORD=password
# Create database (MySQL console atau tool)
CREATE DATABASE laravel_db;
# Run migrations
php artisan migrate
# Seed data
php artisan db:seed
app/
βββ Http/Controllers/ # Business logic
βββ Models/ # Database models
database/
βββ migrations/ # Schema files
βββ seeders/ # Sample data
resources/
βββ views/ # Blade templates
βββ css/
βββ js/
routes/
βββ web.php # Web routes
βββ api.php # API routes
# NPM assets
npm install
npm run dev
# Authentication
php artisan breeze:install
# Production optimization
php artisan config:cache
php artisan route:cache
npm run build
# Deploy ke shared hosting, VPS, atau Docker
# Extract template
unzip template-html.zip
cd template-html
# Jalankan dengan Live Server
# VS Code: Right-click index.html β Open with Live Server
# Atau dengan Python
python3 -m http.server 8000
# Akses: http://localhost:8000
project/
βββ index.html # Home page
βββ css/
β βββ style.css
βββ js/
β βββ main.js
βββ images/
βββ fonts/
βββ assets/
/* Desktop */
.container { max-width: 1200px; }
/* Tablet */
@media (max-width: 768px) {
.container { padding: 15px; }
}
/* Mobile */
@media (max-width: 480px) {
.container { padding: 10px; }
}
// Mobile menu toggle
document.querySelector('.hamburger').addEventListener('click', () => {
document.querySelector('nav').classList.toggle('active');
});
vercel# Windows: XAMPP
# macOS: MAMP
# Linux: Apache + PHP + MySQL
# Extract template
unzip template-php.zip
cd template-php
# Copy ke web server folder
# XAMPP: C:\xampp\htdocs\project
# MAMP: /Applications/MAMP/htdocs/project
# Create .env file
cp .env.example .env
# Edit database credentials
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=password
DB_NAME=project_db
# MySQL console
mysql -u root -p
CREATE DATABASE project_db;
# Or import SQL dump
mysql -u root -p project_db < database/schema.sql
project/
βββ index.php # Entry point
βββ config.php # Configuration
βββ app/
β βββ controllers/ # Business logic
β βββ models/ # Database models
β βββ views/ # HTML templates
βββ database/
βββ public/
β βββ css/
β βββ js/
β βββ images/
βββ .htaccess # URL rewriting
<?php
// config.php - Database connection
$conn = new mysqli("localhost", "root", "password", "project_db");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<?php
// index.php - Simple routing
$page = $_GET['page'] ?? 'home';
require "app/views/{$page}.php";
?>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/?$ index.php?page=$1 [QSA,L]
</IfModule>
Sebelum launch, pastikan:
.env file sudah configurednpm run build atau php artisan build)npx create-react-appnpm create vite -- --template reactnpx create-next-app@latestcomposer global require laravel/installerphp artisanβ Install Node.js dari nodejs.org
β Delete node_modules dan run npm install lagi
β Check .env credentials dan pastikan database server running
β Ganti port: PORT=3001 npm start
β chmod -R 777 uploads (Linux/Mac)
Sudah siap? Pilih tech-stack Anda dan mulai setup sekarang! π
Panduan Membeli & Download Template
Langkah-langkah lengkap untuk membeli template, mengakses di Using Dev, dan download dari Google Drive
Panduan Setup PHP - Dari Template Hingga Production Deployment
Tutorial lengkap setup PHP website dari download template, konfigurasi database, development hingga deployment ke server production