Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 TechGo - Interactive Global Innovation Learning Platform

Overview

TechGo is an innovative EdTech platform designed to make technology education engaging and interactive. It combines a stunning 3D globe interface with an AI-powered adaptive quiz system to help students explore global technological innovations across different countries and continents.

🎯 Key Features

  • Interactive 3D Globe: Explore technological innovations visually on a rotating 3D globe interface
  • AI-Powered Adaptive Quizzes: Dynamic quiz generation using Google Gemini AI that adapts to student skill levels
  • Multi-Language Support: Full support for Indonesian and English interfaces
  • User Progress Tracking: Monitor student learning progression with adaptive difficulty levels (Beginner β†’ Intermediate β†’ Expert)
  • Google Authentication: Secure login with Google or guest access
  • Real-time Database: Track user progress and quiz attempts in real-time
  • Responsive Design: Works seamlessly on desktop and mobile devices

πŸ“Š Project Structure

TechGo/
β”œβ”€β”€ techgo_backend/           # Express.js API Server
β”‚   β”œβ”€β”€ app.js               # Main application file
β”‚   β”œβ”€β”€ package.json         # Backend dependencies
β”‚   β”œβ”€β”€ schema.sql           # MySQL database schema
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── database.js      # MySQL connection pool
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ aiController.js  # Quiz generation & scoring
β”‚   β”‚   └── innovationController.js # Countries & innovations data
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── api.js           # API route definitions
β”‚   └── scratch/             # Development scripts
β”‚
β”œβ”€β”€ techgo_frontend/         # React + Vite Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx          # Main app component with routing
β”‚   β”‚   β”œβ”€β”€ main.jsx         # React entry point
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage.jsx   # Home & authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ MapPage.jsx       # 3D globe interface
β”‚   β”‚   β”‚   β”œβ”€β”€ QuizPage.jsx      # AI quiz interface
β”‚   β”‚   β”‚   └── ProfilePage.jsx   # User progress & stats
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx   # Google & guest auth
β”‚   β”‚   β”‚   └── LanguageContext.jsx # Multi-language support
β”‚   β”‚   β”œβ”€β”€ locales/
β”‚   β”‚   β”‚   └── dictionary.js     # i18n translations
β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”‚   └── fallbackCountries.js # Fallback country data
β”‚   β”‚   └── assets/
β”‚   β”‚       └── models/      # 3D models for landmarks
β”‚   β”œβ”€β”€ package.json         # Frontend dependencies
β”‚   β”œβ”€β”€ vite.config.js       # Vite configuration
β”‚   β”œβ”€β”€ tailwind.config.js   # Tailwind CSS setup
β”‚   └── eslint.config.js     # ESLint configuration
β”‚
└── README.md                # This file

πŸ› οΈ Technology Stack

Backend

Technology Version Purpose
Node.js β‰₯18.0.0 JavaScript runtime
Express.js ^4.19.2 Web framework & API server
MySQL 8.0.x Relational database
mysql2 ^3.9.7 MySQL client driver
Google Generative AI ^0.24.1 AI quiz generation (Gemini API)
CORS ^2.8.5 Cross-origin resource sharing
dotenv ^16.4.5 Environment variable management
nodemon ^3.1.0 Development auto-reload

Frontend

Technology Version Purpose
React ^19.2.6 UI library
Vite ^8.0.12 Build tool & dev server
React Router ^7.17.0 Page routing
Three.js ^0.184.0 3D graphics library
React Globe GL ^2.38.0 Interactive 3D globe component
TailwindCSS ^4.3.0 Utility-first CSS framework
Lucide React ^1.17.0 Icon library
ESLint ^10.3.0 Code linting

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.0.0
  • MySQL 8.0.x Server
  • npm or yarn package manager
  • Google OAuth 2.0 credentials (for authentication)
  • Google Generative AI API key (for quiz generation)

Backend Setup

  1. Navigate to backend folder

    cd techgo_backend
  2. Install dependencies

    npm install
  3. Setup environment variables Create .env file in techgo_backend/:

    PORT=5000
    DB_HOST=your_mysql_host
    DB_USER=your_mysql_user
    DB_PASSWORD=your_mysql_password
    DB_NAME=techgo_db
    GOOGLE_GEMINI_API_KEY=your_gemini_api_key
  4. Setup database

    mysql -u your_mysql_user -p your_mysql_password < schema.sql
  5. Run backend server

    npm start          # Production
    npm run dev        # Development with nodemon

    Backend will run on http://localhost:5000

Frontend Setup

  1. Navigate to frontend folder

    cd techgo_frontend
  2. Install dependencies

    npm install
  3. Setup environment variables Create .env.local file in techgo_frontend/:

    VITE_API_URL=http://localhost:5000/api
    VITE_GOOGLE_CLIENT_ID=your_google_oauth_client_id
  4. Run development server

    npm run dev

    Frontend will run on http://localhost:5173

  5. Build for production

    npm run build
    npm run preview

πŸ“š API Documentation

Base URL

http://localhost:5000/api

Endpoints

Get Countries with Innovations

GET /api/countries

Returns list of all countries with their associated technological innovations.

Response Example:

[
  {
    "id": 1,
    "country_code": "IDN",
    "country_name_id": "Indonesia",
    "country_name_en": "Indonesia",
    "continent": "Asia",
    "latitude": -0.7893,
    "longitude": 113.9213,
    "innovations": [
      {
        "id": 1,
        "title_id": "Teknologi Geothermal",
        "title_en": "Geothermal Technology",
        "description_id": "...",
        "icon_name": "icon_geothermal.png"
      }
    ]
  }
]

Generate AI Quiz

POST /api/quiz/generate
Content-Type: application/json

{
  "user_id": 1,
  "innovation_id": 5,
  "skill_level": "Intermediate"
}

Response Example:

{
  "quiz_id": "quiz_123",
  "questions": [
    {
      "id": 1,
      "question": "What is...",
      "options": ["A", "B", "C", "D"],
      "difficulty": "medium"
    }
  ]
}

Submit Quiz Score

POST /api/quiz/submit
Content-Type: application/json

{
  "user_id": 1,
  "innovation_id": 5,
  "score": 4,
  "correct_answers": 4,
  "total_questions": 5
}

Response Example:

{
  "success": true,
  "new_level": "Intermediate",
  "message": "Great job! You've progressed to Intermediate level"
}

πŸ—„οΈ Database Schema

Key Tables

users

  • Stores user information (Google OAuth & Guest users)
  • Supports multi-provider authentication

countries

  • Contains 12+ country data with 3D coordinates
  • Includes continent classification

innovations

  • Technology innovations per country
  • Bilingual descriptions (Indonesian & English)

user_progress

  • Tracks quiz attempts and scores
  • Manages adaptive skill level progression

See schema.sql for complete details.

πŸŽ“ Learning Features

AI-Powered Quiz System

  • Dynamically generates questions based on innovation topics
  • Uses Google Gemini API for intelligent question creation
  • Adapts difficulty based on user skill level
  • Tracks score and performance metrics

Skill Level Progression

  • Beginner: Introduction level (0-30% score)
  • Intermediate: Intermediate level (31-70% score)
  • Expert: Advanced level (71-100% score)

Multi-Language Support

  • Full UI support for Indonesian & English
  • Bilingual innovation descriptions
  • Language preference saved in context

πŸ” Security Features

  • Environment Variables: Sensitive credentials kept in .env
  • CORS Protection: Controlled origin access
  • SSL/TLS: HTTPS support ready
  • Database Connection: Pool-based MySQL connection
  • User Authentication: Google OAuth 2.0 integration

πŸ“± Responsive Design

TechGo is fully responsive and works on:

  • πŸ–₯️ Desktop (1920px and above)
  • πŸ’» Laptop (1024px - 1919px)
  • πŸ“± Tablet (768px - 1023px)
  • πŸ“² Mobile (below 768px)

πŸš€ Deployment

cPanel Shared Hosting

This project is optimized for cPanel shared hosting:

  1. Use HashRouter for full route compatibility
  2. Environment variables configured via cPanel
  3. MySQL database accessible via cPanel
  4. Frontend builds to static files in public_html

Recommended Hosting

  • Backend: cPanel hosting with Node.js support
  • Frontend: Netlify, Vercel, or cPanel public_html
  • Database: cPanel MySQL 8.0+

πŸ“ˆ Performance Considerations

  • 3D Globe: Lazy-loaded Three.js/React Globe GL
  • Quiz Caching: Reduce AI API calls with intelligent caching
  • Database Indexing: Optimized queries with indexes
  • API Rate Limiting: Implement to prevent abuse
  • Image Optimization: Compressed 3D models and icons

🀝 Contributing

To contribute to TechGo:

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

πŸ“ Development Scripts

Backend

npm run dev      # Start with auto-reload (nodemon)
npm start        # Production start

Frontend

npm run dev      # Start Vite dev server
npm run build    # Production build
npm run lint     # Run ESLint
npm run preview  # Preview production build

πŸ› Troubleshooting

MySQL Connection Issues

# Check MySQL service is running
mysql -u root -p

# Verify credentials in .env
# Ensure database is created and schema imported

CORS Errors

  • Check backend CORS configuration in app.js
  • Verify frontend VITE_API_URL matches backend URL

3D Globe Not Rendering

  • Check Three.js dependencies are installed
  • Verify React Globe GL version compatibility
  • Check browser console for WebGL support

πŸ“„ License

This project is part of the IEEE Future Tech initiative.

πŸ‘¨β€πŸ’Ό Authors

Zidan LPTP - Project Lead & Full Stack Developer

πŸ“ž Support

For issues, questions, or suggestions:

πŸ—ΊοΈ Roadmap

  • 3D Globe Interface
  • AI Quiz Generation
  • Multi-Language Support
  • User Progress Tracking
  • Leaderboard System
  • Offline Mode
  • Mobile App (React Native)
  • Advanced Analytics Dashboard
  • Teacher Dashboard
  • Certificate Generation

πŸŽ‰ Acknowledgments

  • Google Generative AI (Gemini) for quiz generation
  • Three.js community for 3D graphics
  • React community for amazing tools
  • IEEE for the Future Tech initiative

Made with ❀️ for Global Education | Last Updated: July 2026

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages