Skip to content

Survey Application use to conduct survey in real time

excode12/ForumGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ForumGo_Pro - Survey Offline Application

Version React Native License

πŸ“± Overview

ForumGo_Pro (formerly ForumCIV Survey Offline) is a robust, offline-first mobile survey application designed for field data collection in areas with limited or no internet connectivity. Built with React Native and Expo, the app enables users to create, manage, and complete surveys entirely offline, with seamless automatic synchronization to the cloud when connectivity is restored.

✨ Key Features

  • βœ… 100% Offline Functionality - Create and complete surveys without internet
  • πŸ”„ Automatic Cloud Sync - Data syncs automatically when online
  • πŸ“‹ Comprehensive Survey Builder - 11 different question types
  • πŸ“Š Built-in Analytics - Track survey performance and responses
  • πŸ” Secure Data Storage - Local SQLite database with encryption
  • πŸ“ GPS Location Support - Capture geographic data with responses
  • πŸ“· Image Attachments - Add photos to survey responses
  • 🎨 Modern UI/UX - Beautiful, intuitive interface
  • 🌐 Cross-Platform - Works on iOS and Android

πŸ—οΈ Architecture

Frontend

  • Framework: React Native with Expo SDK 54
  • Language: TypeScript
  • Navigation: React Navigation (Stack + Bottom Tabs)
  • State Management: React Context API
  • Local Database: Ready for Firebase Firestore
  • Network Detection: Ready for Firebase network handling

Backend (Firebase Integration Ready)

  • Database: Firebase Firestore (Ready for integration)
  • Authentication: Firebase Auth (Ready for integration)
  • Storage: Firebase Storage (Ready for integration)
  • Hosting: Firebase Hosting (Ready for integration)

πŸ“¦ Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Expo Go app on your mobile device (for testing)
  • iOS Simulator (Mac only) or Android Emulator (optional)

Setup Steps

  1. Clone the Repository
cd ForumGo_Pro
  1. Install Dependencies
npm install
  1. Start the Development Server
npx expo start
  1. Run on Device
  • Scan the QR code with Expo Go app (Android)
  • Scan with Camera app (iOS)

Or run on simulator:

# iOS
npx expo run:ios

# Android
npx expo run:android

πŸ—‚οΈ Project Structure

ForumGo_Pro/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ screens/          # All app screens
β”‚   β”‚   β”œβ”€β”€ Auth/         # Login, Register, Splash
β”‚   β”‚   β”œβ”€β”€ Dashboard/    # Home, Sync, Analytics
β”‚   β”‚   β”œβ”€β”€ Survey/       # Create, List, Take, Preview
β”‚   β”‚   └── Settings/     # Settings screen
β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ common/       # Common components
β”‚   β”‚   └── survey/       # Survey-specific components
β”‚   β”œβ”€β”€ navigation/       # Navigation configuration
β”‚   β”œβ”€β”€ contexts/         # React Context (Auth, Sync)
β”‚   β”œβ”€β”€ services/         # Business logic
β”‚   β”‚   β”œβ”€β”€ database.ts   # SQLite operations
β”‚   β”‚   β”œβ”€β”€ network.ts    # Network detection
β”‚   β”‚   β”œβ”€β”€ sync.ts       # Sync manager
β”‚   β”‚   └── api.ts        # API client
β”‚   β”œβ”€β”€ types/            # TypeScript definitions
β”‚   β”œβ”€β”€ utils/            # Helper functions
β”‚   └── constants/        # App constants
β”œβ”€β”€ assets/               # Images, fonts, etc.
β”œβ”€β”€ App.tsx              # Main app component
β”œβ”€β”€ app.json             # Expo configuration
β”œβ”€β”€ package.json         # Dependencies
└── tsconfig.json        # TypeScript config

🎯 Core Features

1. Survey Creation

Create comprehensive surveys with 11 question types:

  • Short Answer - Brief text responses
  • Paragraph - Long-form text
  • Multiple Choice - Single selection
  • Checkboxes - Multiple selections
  • Dropdown - Select from list
  • Rating Scale - 1-5 star rating
  • Yes/No - Binary choice
  • Date Picker - Date selection
  • Number Input - Numeric values
  • Image Upload - Photo attachments
  • GPS Location - Geographic coordinates

2. Offline-First Architecture

  • All data stored locally in SQLite database
  • Surveys and responses saved instantly
  • Works completely without internet
  • Automatic background sync when online
  • Sync queue with retry mechanism
  • Conflict resolution built-in

3. Data Synchronization

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Offline Actions    β”‚
β”‚  (Create, Answer)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Local SQLite DB    β”‚
β”‚  (Pending Status)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Network Detected   β”‚
β”‚  (Auto Trigger)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Sync to Cloud API  β”‚
β”‚  (Background)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Mark as Synced     β”‚
β”‚  (Update Status)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4. User Interface

12 Main Screens:

  1. Splash Screen - App initialization
  2. Login Screen - User authentication
  3. Register Screen - New user signup
  4. Home Dashboard - Central hub with stats
  5. Survey List - View all surveys (Draft/Published)
  6. Create Survey - Build new surveys
  7. Edit Survey - Modify existing surveys
  8. Preview Survey - Test survey before publishing
  9. Take Survey - Complete survey responses
  10. Sync Center - Manage data synchronization
  11. Analytics Dashboard - View insights and stats
  12. Settings - App preferences and account

πŸ”§ Configuration

Database

SQLite tables are automatically created on first launch:

  • users - User accounts
  • surveys - Survey metadata
  • questions - Survey questions
  • responses - Survey answers
  • sync_queue - Pending sync items
  • auth_tokens - Authentication tokens

API Endpoints (Backend)

If connecting to a backend server, configure in src/constants/index.ts:

export const API_BASE_URL = 'https://your-api.com/api';

export const API_ENDPOINTS = {
  LOGIN: '/auth/login',
  REGISTER: '/auth/register',
  SYNC: '/sync',
  SURVEYS: '/surveys',
  RESPONSES: '/responses',
  TEMPLATES: '/templates',
};

πŸš€ Usage Guide

For Field Workers

  1. First Time Setup

    • Download and install the app
    • Create an account or login
    • App caches credentials for offline use
  2. Creating Surveys

    • Tap "Create New Survey" on home screen
    • Fill in survey details (title, description, category)
    • Add questions with desired types
    • Save as draft or publish immediately
  3. Taking Surveys

    • Navigate to "Surveys" tab
    • Select a survey to complete
    • Answer all required questions
    • Submit (saves locally if offline)
  4. Syncing Data

    • Connect to WiFi or mobile data
    • App syncs automatically
    • Or manually trigger from Sync Center
    • View sync status and pending items

For Administrators

  1. Setup Firebase (recommended)

    • Create Firebase project
    • Configure Firestore database
    • Setup Firebase Authentication
    • Configure Firebase Storage
  2. Configure App

    • Update API_BASE_URL in constants
    • Build production app
    • Distribute to field workers

πŸ› οΈ Development

Available Scripts

# Start development server
npm start

# Run on iOS simulator
npm run ios

# Run on Android emulator
npm run android

# Run on web browser
npm run web

# Type checking
npm run tsc

# Lint code
npm run lint

Building for Production

# Build for iOS
eas build --platform ios

# Build for Android
eas build --platform android

# Build for both
eas build --platform all

Environment Variables

Create .env file in root:

API_BASE_URL=https://your-api.com
API_TIMEOUT=10000
ENABLE_DEBUG=false

πŸ“Š Data Flow

Survey Creation Flow

User Input β†’ Validation β†’ Generate UUID β†’ Save to SQLite β†’ 
Add to Sync Queue β†’ (When Online) β†’ Send to API β†’ 
Update Sync Status β†’ Confirm to User

Response Collection Flow

Select Survey β†’ Load Questions β†’ User Answers β†’ 
Validate Required β†’ Save Locally β†’ Queue for Sync β†’ 
(When Online) β†’ Upload Response β†’ Mark Synced

πŸ” Security

  • All authentication tokens stored securely using expo-secure-store
  • SQLite database encrypted on device
  • JWT tokens with expiration
  • HTTPS for all API communications
  • No sensitive data logged in production

πŸ§ͺ Testing

Manual Testing Checklist

  • Create survey offline
  • Answer survey offline
  • Verify data persists after app restart
  • Test sync when internet available
  • Verify sync retry on failure
  • Test all 11 question types
  • Check analytics calculations
  • Test logout and re-login

πŸ“± Supported Platforms

  • iOS: 13.0 and above
  • Android: 5.0 (API 21) and above
  • Web: Modern browsers (preview only)

πŸ› Troubleshooting

Common Issues

1. Database Not Initializing

# Clear Expo cache
npx expo start -c

2. Sync Not Working

  • Check network connection
  • Verify API endpoint is correct
  • Check authentication token validity

3. Navigation Errors

# Reinstall navigation packages
npm install @react-navigation/native @react-navigation/stack @react-navigation/bottom-tabs

4. Build Errors

# Clean and reinstall
rm -rf node_modules
npm install

πŸ“ˆ Roadmap

Version 1.1

  • Dark mode support
  • Multiple language support (i18n)
  • Export surveys to PDF
  • Bulk import questions from CSV
  • Survey templates library

Version 1.2

  • Offline maps integration
  • Voice recording support
  • Signature capture
  • Advanced conditional logic
  • Team collaboration features

Version 2.0

  • Real-time collaboration
  • Advanced analytics with charts
  • Custom branding
  • Role-based access control
  • API for third-party integrations

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘₯ Team

  • Project Lead: ForumCIV Team
  • Development: Community Contributors
  • Design: UI/UX Team

πŸ“ž Support


πŸ™ Acknowledgments

  • React Native and Expo teams
  • All open-source contributors
  • Field workers who inspired this project
  • ForumCIV community

πŸ“ Changelog

v1.0.0 (2025-10-21)

  • ✨ Initial release
  • 🎯 Complete offline functionality
  • πŸ“‹ 11 question types
  • πŸ”„ Automatic sync system
  • πŸ“Š Analytics dashboard
  • πŸ” Secure authentication
  • πŸ“± iOS and Android support

Made with ❀️ for field data collectors worldwide


Quick Start Commands

# Install dependencies
npm install

# Start development
npx expo start

# Test on physical device
# 1. Install Expo Go on your phone
# 2. Scan QR code from terminal
# 3. App will load on your device

# Build for production
npx eas build --platform all

For more detailed documentation, visit our Wiki.

About

Survey Application use to conduct survey in real time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published