Campedia is a mobile application designed for renting camping equipment and gear. It provides a seamless experience for outdoor enthusiasts to browse, rent, and manage camping gear, making outdoor adventures more accessible.
This project is built using a Client-Server architecture with a Flutter frontend and a FastAPI backend.
Campedia allows users to:
- Browse Catalog: View available camping gear, categories, and recommended items.
- Rent Equipment: Add items to a cart, proceed to checkout, and manage rentals.
- Manage Account: User authentication (Sign In/Sign Up), profile management, and transaction history.
- Features: Wishlist, Notifications, Order Tracking, and more.
The system follows a separated frontend-backend architecture:
- Framework: Flutter
- State Management: Provider
- Structure:
pages/: UI Screens (Home, Detail, Cart, Profile, etc.)providers/: State management logic for logic separation.services/: API communication layer.models/: Data models matching API responses.
- Framework: FastAPI (Python)
- Database: SQL (MySQL)
- Structure:
routes/: API endpoints (Barang, Cart, Transaction, User, etc.)services/: Business logic.models/: Database schemas (Pydantic/SQLAlchemy).config/: Database configuration.static/: Serves static assets like product images.
- Mobile App: Flutter (Dart)
- Backend API: FastAPI (Python)
- Database: MySQL
- Assets: Local assets & Static file serving
- Python 3.x installed.
- Flutter SDK installed.
- MySQL Database running.
- Import the SQL dump file located in
campedia/database/db_provis_2.sql(orcampedia-fastapi/Database/db_provis.sql) into your MySQL database. - Configure the database connection in
campedia-fastapi/config/database.pyto match your local MySQL credentials.
Navigate to the backend directory:
cd campedia-fastapiInstall dependencies:
pip install -r requirements.txtRun the server:
# Using uvicorn
uvicorn main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000 (or your machine's IP).
Navigate to the frontend directory:
cd campediaImportant: Check the API Configuration
Open lib/services/api_config.dart (or similar config file) and ensure the baseUrl points to your running FastAPI server (e.g., http://10.0.2.2:8000 for Android Emulator or your LAN IP for physical devices).
Install dependencies:
flutter pub getRun the application:
flutter runcampedia-project/
βββ campedia-fastapi/ # Python FastAPI Backend
β βββ main.py # Entry point
β βββ routes/ # API Endpoints
β βββ config/ # DB Config
β βββ ...
βββ campedia/ # Flutter Mobile App
βββ lib/ # Dart code
βββ pubspec.yaml # Dependencies
βββ ...