FixIt is a smart mobile companion designed to be your one-stop solution for everyday problems. Instead of juggling multiple apps or services, FixIt brings everything together in a single, intuitive platform.
FixIt is a comprehensive service platform that consists of:
- Backend: Ballerina-based REST API with MongoDB database
- Mobile: Flutter app for Android
- Features: User authentication, service requests, real-time chat, maps integration, AI assistance
- Backend: Ballerina 2201.12.4, MongoDB, JWT Authentication
- Mobile: Flutter 3.2.0+, Dart
- Services: Google Maps API, AI integration with Gemini
- Ballerina 2201.12.4 or later
- MongoDB Atlas account or local MongoDB instance
- Java 11 or later
- Flutter 3.2.0 or later
- Dart SDK
- Android Studio / VS Code with Flutter extensions
- Android development: Android SDK
- Google Maps API Key (for mobile app)
- Gemini AI API Key (for AI features)
- MongoDB connection string
FixIt/
├── backend/ # Ballerina backend services
│ ├── main.bal # Main service definitions
│ ├── Config.toml # Configuration file
│ └── modules/ # Modular code organization
├── mobile/ # Flutter mobile application
│ ├── lib/ # Dart source code
│ ├── android/ # Android platform files
│ └── assets/ # Images, fonts, etc.
├── .env.example # An example env file to be used inside the mobile folder
└── README.md # This file
git clone https://github.com/Cognic-AI/iwb25-097-cognic-ai.gitcd iwb25-097-cognic-aiCreate a .env file in the mobile directory with the required environment variables (see .env.example in the repository).
-
Navigate to the backend directory:
cd backend -
Update
Config.tomlwith your database credentials and API keys:[backend.controllers] jwtSecretKey = "your-jwt-secret-key" geminiApiKey = "your-gemini-api-key" [backend.utils] connectionString = "your-mongodb-connection-string" mongoHost = "your-mongo-host" mongoPort = 27017 mongoUsername = "your-username" mongoPassword = "your-password" mongoAuthSource = "admin"
cd backend
bal buildThe backend runs multiple services on different ports:
# Start all services
bal run
# Services will be available on:
# - Authentication: http://localhost:8080/api/auth
# - Health Check: http://localhost:8083/api/health
# - Admin: http://localhost:8081/api/admin
# - AI Chat: http://localhost:8082/api/ai
# - Vendor Services: http://localhost:8084/api/services
# - Requests: http://localhost:8086/api/requests
# - Subscriptions: http://localhost:8085/api/subscriptions
# - Messaging: http://localhost:8087/api/chatcd mobile
flutter pub getCreate a .env file in the mobile/ directory with your API keys and service URLs (see example below).
Note: You may need to connect your android mobile phone and enable developer options. You also need to connect your local computer to the relevant mobile hotspot.
# For development with logs (Windows)
run_with_logs.bat
# Or manually
flutter run
# For specific platforms
flutter run -d androidCreate a .env file in the mobile/ directory:
# API Service URLs (Backend Services)
AUTH_SERVICE_URL=http://localhost:8080/api/auth
VENDOR_SERVICE_URL=http://localhost:8084/api/services
REQUEST_SERVICE_URL=http://localhost:8086/api/requests
SUBSCRIPTION_SERVICE_URL=http://localhost:8085/api/subscriptions
MESSAGING_SERVICE_URL=http://localhost:8087/api/chat
AI_URL=http://localhost:8082/api/ai
# Google Maps Integration
GOOGLE_MAPS_API_KEY=your_google_maps_api_key_hereNote: Open Command Prompt (cmd) and enter ipconfig to find your ipv4 address. Use this address intead of 'localhost' in the above service urls
Note: See
.env.examplefor a complete template with all available environment variables.
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/changePassword- Change password
GET /api/health- Health check- Various service-specific endpoints on ports 8081-8087
For detailed API documentation, see backend/AUTH_GUIDE.md.
cd backend
# Build the project
bal build
# Run with hot reload during development
bal run
# Run tests
bal testcd mobile
# Install dependencies
flutter pub get
# Run in debug mode
flutter run
# Build for release
flutter build apk # Android
# Run tests
flutter testmain.bal- Service definitions and routingmodules/controllers/- Request handlersmodules/models/- Data modelsmodules/utils/- Utility functions and database config
lib/main.dart- App entry pointlib/pages/- UI screenslib/services/- API and business logic serviceslib/models/- Data modelslib/widgets/- Reusable UI components
- Create a MongoDB Atlas account
- Create a new cluster
- Create a database user
- Add your IP to the whitelist
- Get the connection string
- Update
backend/Config.tomlwith your credentials
# Install MongoDB locally
# Update Config.toml with local connection details
connectionString = "mongodb://localhost:27017/fixit"- Go to Google Cloud Console
- Create a new project or select existing
- Enable Maps SDK for Android/iOS
- Create API credentials
- Add the API key to your
.envfile
- Go to Google AI Studio
- Generate an API key
- Add to
backend/Config.toml
- Port conflicts: Ensure ports 8080-8087 are available
- MongoDB connection: Verify connection string and network access
- Ballerina version: Use Ballerina 2201.12.4 or compatible version
- Environment variables: Ensure
.envfile exists and is properly formatted - Flutter version: Use Flutter 3.2.0 or later
- API connectivity: Verify backend services are running before starting mobile app
- Google Maps: Ensure API key is valid and Maps SDK is enabled
# Check Flutter doctor for setup issues
flutter doctor
# Clear Flutter cache if needed
flutter clean
flutter pub get
# Verify Ballerina installation
bal version
# Check service health
curl http://localhost:8083/api/health