Skip to content

NiqueWrld/TropiLink

Repository files navigation

🌴 TropiLink

React Native TypeScript Node.js Express Socket.io Stripe

A cross-platform super app for travel & payments in Seychelles 🇸🇨


📸 Screenshots

TropiLink App

Android Emulator - Expo Installation

Installing on Android Emulator

WeChat Mini Program (微信小程序)

WeChat DevTools

Alipay Mini Program (支付宝小程序)

Alipay Mini Program

Stripe Payment Integration

Real-Time Chat with Socket.io


📖 Overview

TropiLink is an all-in-one platform connecting tourists and locals with local services — tours, taxis, boats, and more. Think of it as a mini Grab or WeChat tailored for the Seychelles islands.

✨ Key Features

  • 🚕 Service Booking — Book tours, taxis, boats, and local experiences
  • 💬 Real-Time Chat — Instant messaging between users and service providers
  • 💳 Multi-Payment Support — Stripe, WeChat Pay, Alipay integration
  • 🌏 Chinese Mini Programs — WeChat, Alipay, and Baidu Smart Programs for Chinese tourists
  • 📱 Cross-Platform — Mobile apps for iOS, Android, and Web
  • 🖥️ Admin Dashboard — Comprehensive management interface

🏗️ Project Structure

TropiLink/
├── backend/                 # Node.js + Express API Server
│   ├── src/
│   │   ├── controllers/     # Route handlers
│   │   ├── models/          # Database models
│   │   ├── routes/          # API routes
│   │   ├── middleware/      # Auth, validation
│   │   ├── services/        # Business logic
│   │   └── utils/           # Helper functions
│   └── package.json
│
├── user-app/                # React Native / Expo Mobile App
│   ├── src/
│   │   ├── screens/         # App screens
│   │   ├── components/      # Reusable components
│   │   ├── navigation/      # React Navigation setup
│   │   ├── services/        # API & Socket services
│   │   ├── context/         # React Context (Auth, etc.)
│   │   └── utils/           # Helpers & constants
│   ├── app.json             # Expo configuration
│   ├── eas.json             # EAS Build configuration
│   └── package.json
│
├── admin-dashboard/         # React Admin Panel
│   ├── src/
│   │   ├── pages/           # Dashboard pages
│   │   ├── components/      # UI components
│   │   └── services/        # API integration
│   └── package.json
│
├── wechat-miniprogram/      # WeChat Mini Program (微信小程序)
│   ├── pages/               # Mini program pages
│   ├── app.js
│   ├── app.json
│   └── project.config.json
│
├── alipay-miniprogram/      # Alipay Mini Program (支付宝小程序)
│   ├── pages/               # Mini program pages
│   ├── app.js
│   └── app.json
│
├── baidu-smartprogram/      # Baidu Smart Program (百度智能小程序)
│   ├── pages/               # Smart program pages
│   ├── app.js
│   └── project.swan.json
│
└── documentation/           # Project documentation

🛠️ Tech Stack

Layer Technology
Backend Node.js, Express, TypeScript
Database Supabase (PostgreSQL)
Real-Time Socket.io (WebSocket)
User App React Native, Expo
Admin Dashboard React, TypeScript, Vite
Mini Programs WeChat, Alipay, Baidu
Payments Stripe, WeChat Pay, Alipay
Authentication JWT, Supabase Auth

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Expo CLI (npm install -g expo-cli)
  • EAS CLI (npm install -g eas-cli) — for native builds

Installation

# Clone the repository
git clone https://github.com/NiqueWrld/TropiLink.git
cd TropiLink

# Install backend dependencies
cd backend
npm install

# Install user app dependencies
cd ../user-app
npm install

# Install admin dashboard dependencies
cd ../admin-dashboard
npm install

Environment Variables

Create .env files in each project:

Backend (backend/.env):

PORT=3000
DATABASE_URL=your_supabase_connection_string
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
JWT_SECRET=your_jwt_secret
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx

User App (user-app/.env):

EXPO_PUBLIC_API_URL=http://localhost:3000/api
EXPO_PUBLIC_SOCKET_URL=http://localhost:3000
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxx

Running the App

# Start backend server
cd backend
npm run dev

# Start user app (in a new terminal)
cd user-app
npm start
# Press 'w' for web, 'a' for Android, 'i' for iOS

# Start admin dashboard (in a new terminal)
cd admin-dashboard
npm run dev

📱 Building Native Apps

TropiLink uses Expo EAS Build to compile native Android and iOS apps:

cd user-app

# Login to Expo
eas login

# Build Android APK (for testing)
npm run build:android:preview

# Build Android AAB (for Play Store)
npm run build:android

# Build iOS (requires Apple Developer account)
npm run build:ios

🇨🇳 Chinese Mini Programs

WeChat Mini Program (微信小程序)

# Open in WeChat DevTools
# Import project from: wechat-miniprogram/
# AppID: Your registered WeChat AppID

Alipay Mini Program (支付宝小程序)

# Open in Alipay DevTools
# Import project from: alipay-miniprogram/

Baidu Smart Program (百度智能小程序)

# Open in Baidu DevTools
# Import project from: baidu-smartprogram/

📡 API Endpoints

Authentication

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login User login
POST /api/auth/logout User logout
GET /api/auth/me Get current user

Services

Method Endpoint Description
GET /api/services List all services
GET /api/services/:id Get service details
GET /api/services/category/:category Get by category
POST /api/services Create service (Provider)

Bookings

Method Endpoint Description
GET /api/bookings/my Get user's bookings
POST /api/bookings Create booking
PATCH /api/bookings/:id/cancel Cancel booking
POST /api/bookings/:id/rate Rate booking

Chat

Method Endpoint Description
GET /api/chat/conversations Get conversations
GET /api/chat/conversations/:id/messages Get messages
POST /api/chat/conversations/:id/messages Send message

👥 User Roles

Role Description
Tourist Visitors booking services
Local Residents using local services
Provider Business owners offering services
Admin Platform administrators

💳 Payment Integration

TropiLink supports multiple payment methods:

  • Stripe — International credit/debit cards
  • WeChat Pay — Chinese mobile payments
  • Alipay — Chinese mobile payments

🔌 WebSocket Events

Real-time features powered by Socket.io:

// Client events
socket.emit('join', { conversationId });
socket.emit('sendMessage', { conversationId, content });
socket.emit('typing', { conversationId });

// Server events
socket.on('newMessage', (message) => {});
socket.on('userTyping', (data) => {});
socket.on('bookingUpdate', (booking) => {});

📄 License

This project is licensed under the MIT License.


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


📧 Contact

NiqueWrld - GitHub


Made with ❤️ for Seychelles 🇸🇨

About

Modern web platform for connecting communities and sharing resources

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors