Skip to content

chandradhrmawan/react-codot

Repository files navigation

Darma Cipta Media - Company Profile Website

Solusi percetakan profesional untuk kebutuhan bisnis dan personal Anda. Website company profile modern dengan React + Vite + Tailwind CSS.

πŸš€ Tech Stack

  • React 19 - UI Library
  • Vite - Build Tool & Dev Server
  • Tailwind CSS - Utility-First CSS Framework
  • React Router - Client-Side Routing
  • PostCSS & Autoprefixer - CSS Processing

πŸ“‹ Features

  • βœ… Responsive Design (Mobile-First)
  • βœ… Modern & Clean UI
  • βœ… 8 Pages (Home, Produk, Layanan, Portofolio, Tentang, Kontak, FAQ, 404)
  • βœ… Reusable Components
  • βœ… Product Catalog with Filtering
  • βœ… Contact Form with Validation
  • βœ… FAQ Accordion
  • βœ… Portfolio Gallery
  • βœ… SEO Friendly
  • βœ… Accessible (ARIA Labels)

πŸ› οΈ Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm atau yarn

Steps

  1. Clone repository
git clone <repository-url>
cd compro-codot
  1. Install dependencies
npm install
  1. Run development server
npm run dev
  1. Open browser and visit http://localhost:5173

πŸ“¦ Available Scripts

Development

npm run dev

Menjalankan development server dengan hot-reload di http://localhost:5173

Build

npm run build

Membuat production build yang dioptimasi di folder dist/

Preview

npm run preview

Preview production build secara lokal

Lint

npm run lint

Menjalankan ESLint untuk code quality check

Format (Optional)

npm run format

Format kode menggunakan Prettier (jika diinstall)

πŸ“ Project Structure

compro-codot/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/            # Images, fonts, etc
β”‚   β”œβ”€β”€ components/        # Reusable components
β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”œβ”€β”€ Hero.jsx
β”‚   β”‚   β”œβ”€β”€ ProductCard.jsx
β”‚   β”‚   β”œβ”€β”€ ServiceList.jsx
β”‚   β”‚   β”œβ”€β”€ GalleryGrid.jsx
β”‚   β”‚   β”œβ”€β”€ Testimonial.jsx
β”‚   β”‚   β”œβ”€β”€ CTA.jsx
β”‚   β”‚   └── ContactForm.jsx
β”‚   β”œβ”€β”€ data/              # Static data (JSON)
β”‚   β”‚   └── products.json
β”‚   β”œβ”€β”€ pages/             # Page components
β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”œβ”€β”€ Produk.jsx
β”‚   β”‚   β”œβ”€β”€ Layanan.jsx
β”‚   β”‚   β”œβ”€β”€ Portofolio.jsx
β”‚   β”‚   β”œβ”€β”€ Tentang.jsx
β”‚   β”‚   β”œβ”€β”€ Kontak.jsx
β”‚   β”‚   β”œβ”€β”€ FAQ.jsx
β”‚   β”‚   └── NotFound.jsx
β”‚   β”œβ”€β”€ App.jsx            # Main app with routing
β”‚   β”œβ”€β”€ main.jsx           # Entry point
β”‚   β”œβ”€β”€ index.css          # Global styles + Tailwind
β”‚   └── App.css            # App-specific styles
β”œβ”€β”€ .gitignore
β”œβ”€β”€ eslint.config.js
β”œβ”€β”€ index.html             # HTML template
β”œβ”€β”€ package.json
β”œβ”€β”€ postcss.config.js      # PostCSS configuration
β”œβ”€β”€ tailwind.config.js     # Tailwind configuration
β”œβ”€β”€ vite.config.js         # Vite configuration
└── README.md

🎨 Customization

Brand Colors

Edit tailwind.config.js untuk mengubah warna brand:

colors: {
  primary: { ... },   // Biru (untuk CTA, links)
  accent: { ... },    // Kuning (untuk highlights)
  navy: { ... },      // Navy (untuk text & headers)
}

Products Data

Edit src/data/products.json untuk menambah/mengubah produk:

{
  "id": 1,
  "name": "Nama Produk",
  "category": "offset|digital|kalender|brosur|agenda|lainnya",
  "description": "Deskripsi produk",
  "specs": { ... },
  "priceRange": "Rp ...",
  "images": []
}

Contact Information

Edit kontak di:

  • src/components/Footer.jsx
  • src/pages/Kontak.jsx

🌐 Deployment

Vercel (Recommended)

  1. Install Vercel CLI
npm i -g vercel
  1. Deploy
vercel
  1. Follow the prompts

Atau via Vercel Dashboard:

  1. Push code ke GitHub
  2. Import repository di vercel.com
  3. Vercel akan auto-detect Vite dan deploy

Netlify

  1. Build project
npm run build
  1. Drag & drop folder dist/ ke Netlify Drop

Atau via Netlify CLI:

npm i -g netlify-cli
netlify deploy --prod

GitHub Pages

  1. Install gh-pages
npm install -D gh-pages
  1. Add to package.json:
"scripts": {
  "predeploy": "npm run build",
  "deploy": "gh-pages -d dist"
}
  1. Update vite.config.js:
export default defineConfig({
  base: '/compro-codot/',
  plugins: [react()],
})
  1. Deploy
npm run deploy

βœ… SEO Checklist

  • Update index.html meta tags (title, description, keywords)
  • Add Open Graph tags untuk social media
  • Tambahkan favicon di public/
  • Generate sitemap.xml
  • Setup robots.txt
  • Optimize images (compress & use WebP)
  • Add alt text ke semua images
  • Implement lazy loading untuk images
  • Setup Google Analytics (optional)
  • Submit sitemap ke Google Search Console

Example Meta Tags

Edit index.html:

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="description" content="Darma Cipta Media - Solusi offset & digital printing berkualitas tinggi. Melayani cetak kalender, brosur, buku agenda, dan lainnya." />
  <meta name="keywords" content="percetakan, offset printing, digital printing, kalender, brosur, jakarta" />
  
  <!-- Open Graph -->
  <meta property="og:title" content="Darma Cipta Media - Printing Profesional" />
  <meta property="og:description" content="Solusi percetakan berkualitas tinggi untuk bisnis Anda" />
  <meta property="og:image" content="/og-image.jpg" />
  <meta property="og:url" content="https://darmaciptamedia.com" />
  
  <title>Darma Cipta Media - Offset & Digital Printing</title>
</head>

β™Ώ Accessibility Features

  • Semantic HTML elements
  • ARIA labels pada interactive elements
  • Keyboard navigation support
  • Focus indicators
  • Alt text pada images
  • Sufficient color contrast
  • Responsive font sizes

πŸ› Troubleshooting

Port sudah digunakan

# Ganti port di vite.config.js
export default defineConfig({
  server: { port: 3000 },
  plugins: [react()],
})

Module not found errors

# Clear cache dan reinstall
rm -rf node_modules package-lock.json
npm install

Build errors

# Check for syntax errors
npm run lint

πŸ“ž Support

Untuk pertanyaan atau bantuan:

πŸ“„ License

MIT License - feel free to use for your projects!


Built with ❀️ using React + Vite + Tailwind CSS

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •