RestoMi adalah Progressive Web Application (PWA) untuk katalog restoran yang memungkinkan pengguna untuk menjelajahi daftar restoran, melihat detail restoran, dan menyimpan restoran favorit. Aplikasi ini dibangun dengan teknologi web modern dan dapat diakses secara offline.
- π Homepage - Tampilan daftar semua restoran dengan layout card yang responsif
- π± Progressive Web App - Dapat diinstall dan berjalan offline
- β€οΈ Sistem Favorit - Simpan dan kelola restoran favorit dengan IndexedDB
- π Detail Restoran - Informasi lengkap termasuk menu, rating, dan customer reviews
- π± Responsive Design - Optimal di semua perangkat (mobile, tablet, desktop)
- β‘ Lazy Loading - Optimasi performa dengan lazy loading gambar
- π― Accessibility - Mendukung screen reader dan keyboard navigation
- Vanilla JavaScript ES6+ - Modern JavaScript tanpa framework
- Web Components - Custom elements untuk komponen reusable
- CSS3 - Styling dengan responsive design
- HTML5 - Semantic markup
- Webpack 5 - Module bundler dengan konfigurasi dev/prod
- Babel - JavaScript transpiler untuk browser compatibility
- ESLint - Code linting dengan Airbnb style guide
- Sharp - Image optimization
- Service Worker - Caching untuk offline functionality
- Web App Manifest - Native app-like installation
- Workbox - PWA libraries untuk caching strategies
- Karma + Jasmine - Unit testing
- CodeceptJS + Puppeteer - End-to-end testing
- IndexedDB - Local database untuk data favorit
- Restaurant API - External API dari Dicoding
- IDB Library - Promise-based IndexedDB wrapper
- Node.js (v14 atau lebih baru)
- npm atau yarn
- Browser modern (Chrome, Firefox, Safari, Edge)
-
Clone repository
git clone https://github.com/knock5/RestoMi-Web.git cd RestoMi-Web -
Install dependencies
npm install
-
Development server
npm run start-dev
Aplikasi akan berjalan di
http://localhost:8080 -
Build untuk production
npm run build
-
Serve production build
npm run serve
RestoMi-Web/
βββ src/
β βββ components/ # Web Components
β β βββ FavoriteButton/ # Like/Unlike button
β β βββ FooterComponent/ # Footer component
β β βββ NavComponent/ # Navigation component
β βββ data/ # Data layer
β β βββ favorite-resto-idb.js # IndexedDB operations
β β βββ restodb-source.js # API calls
β βββ globals/ # Global configurations
β β βββ api-endpoints.js # API endpoint definitions
β β βββ config.js # App configuration
β βββ public/ # Static assets
β β βββ app.webmanifest # PWA manifest
β β βββ images/ # Icons and images
β βββ routes/ # Routing system
β β βββ routes.js # Route definitions
β β βββ url-parser.js # URL parsing utility
β βββ scripts/ # Entry points
β β βββ index.js # Main entry point
β βββ styles/ # CSS files
β βββ templates/ # HTML templates
β β βββ index.html # Main HTML template
β βββ utils/ # Utility functions
β βββ views/ # Page components
β βββ app.js # Main app class
β βββ contents/ # Template creators
β βββ pages/ # Page implementations
βββ e2e/ # End-to-end tests
βββ specs/ # Unit tests
βββ webpack.*.js # Webpack configurations
βββ karma.conf.js # Karma test configuration
βββ codecept.conf.js # CodeceptJS configuration
βββ package.json
| Command | Description |
|---|---|
npm run start-dev |
Start development server dengan hot reload |
npm run build |
Build aplikasi untuk production |
npm run serve |
Serve production build |
npm run build-image |
Optimize images dengan Sharp |
npm test |
Run unit tests dengan Karma |
npm run e2e |
Run end-to-end tests dengan CodeceptJS |
npm run lint |
Run ESLint untuk code quality check |
Aplikasi ini mengintegrasikan dengan Dicoding Restaurant API:
- GET
/list- Mendapatkan daftar semua restoran - GET
/detail/{id}- Mendapatkan detail restoran berdasarkan ID
// List Restaurants
{
"error": false,
"message": "success",
"count": 20,
"restaurants": [...]
}
// Restaurant Detail
{
"error": false,
"message": "success",
"restaurant": {
"id": "rqdv5juczeskfw1e867",
"name": "Melting Pot",
"description": "Lorem ipsum...",
"city": "Medan",
"address": "Jln. Pandeglang no 19",
"pictureId": "14",
"rating": 4.2,
"menus": {
"foods": [...],
"drinks": [...]
},
"customerReviews": [...]
}
}Aplikasi menggunakan IndexedDB untuk menyimpan data favorit:
- Database:
restaurant-list-database - Object Store:
restaurants - Key Path:
id
npm test- Framework: Karma + Jasmine
- Coverage: Core functionality dan utility functions
npm run e2e- Framework: CodeceptJS + Puppeteer
- Scenarios: Like/unlike restaurant functionality
- Aplikasi dapat diinstall di perangkat mobile dan desktop
- Icon dan splash screen tersedia untuk semua ukuran
- Service Worker untuk caching resources
- Favorite restaurants dapat diakses offline
- Graceful degradation saat offline
- Lazy loading untuk optimasi gambar
- Code splitting dengan Webpack
- Minification dan compression
- Mobile-first approach
- Breakpoints untuk tablet dan desktop
- Touch-friendly interface
- Semantic HTML structure
- ARIA labels untuk screen readers
- Keyboard navigation support
- Skip links untuk navigasi cepat
- Modern card-based layout
- Consistent color scheme
- Loading states dan animations
- FontAwesome icons
- ESLint dengan Airbnb configuration
- Modular JavaScript architecture
- Separation of concerns
- Clean code principles
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Mobile browsers
This project is licensed under the ISC License.
Miftachul Huda
- Email: miftachulhd5@gmail.com
- Instagram: @miftachulhd
- Dicoding untuk Restaurant API
- Freepik - Flaticon untuk icons
- FontAwesome untuk icon library
β Star this repository jika project ini membantu Anda!