Skip to content

Smilelife1177/RideUA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚗 RideUA

A Telegram Mini App for ridesharing — a free alternative to BlaBlaCar with zero platform fees.

Drivers post trips, passengers book seats, payment is made directly in cash. No intermediaries, no commissions.


✨ Features

  • 🔍 Ride search with filtering by departure and destination city
  • 🚗 Post a trip — driver sets route, date, price and available seats
  • 📋 Seat booking — passenger sends a request, driver confirms or rejects
  • 🔔 In-app notifications — driver sees incoming booking requests in the "My" tab
  • 👤 User profile — rating, trip count, reviews
  • 🏙️ City autocomplete — suggestions while typing a city name
  • 💵 Cash payment — no online payments, no platform fees

🛠️ Tech Stack

Part Technology
Frontend React + Vite
Telegram Bot Node.js + Grammy
Database Supabase (PostgreSQL)
Frontend Hosting Vercel
Bot Hosting Railway

📁 Project Structure

rideua/
├── bot/                  # Telegram bot
│   ├── index.js          # Main bot file
│   ├── package.json
│   └── .env              # Secrets (not in git)
│
├── webapp/               # React Mini App
│   ├── src/
│   │   ├── components/
│   │   │   ├── RideList.jsx      # Ride feed with search
│   │   │   ├── RideCard.jsx      # Ride card with booking
│   │   │   ├── AddRide.jsx       # Add ride form
│   │   │   ├── MyRides.jsx       # My rides + incoming requests
│   │   │   ├── Profile.jsx       # User profile
│   │   │   └── CityInput.jsx     # City search with suggestions
│   │   ├── supabase.js           # Supabase client
│   │   ├── App.jsx
│   │   └── main.jsx
│   ├── index.html
│   ├── package.json
│   └── .env.local        # Supabase keys (not in git)
│
└── README.md

🚀 Running Locally

1. Clone the repository

git clone https://github.com/your_username/rideua.git
cd rideua

2. Set up the bot

cd bot
npm install

Create bot/.env:

BOT_TOKEN=your_token_from_BotFather
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_anon_key
WEBAPP_URL=https://rideua.vercel.app

Start the bot:

node index.js

3. Set up the web app

cd ../webapp
npm install

Create webapp/.env.local:

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_KEY=your_anon_key

Start locally:

npm run dev

Open http://localhost:5173


🗄️ Database Schema

The project uses Supabase. Table structure:

users

Column Type Description
id bigint Telegram user ID
name text Display name
username text Telegram username
rating numeric Rating (1–5)
trips_count int Total trips completed

rides

Column Type Description
id uuid Unique ID
driver_id bigint Driver's user ID
from_city text Departure city
to_city text Destination city
departure_time timestamptz Date and time of departure
seats_total int Total seats
seats_left int Available seats
price int Price in UAH
status text active / cancelled / completed

bookings

Column Type Description
id uuid Unique ID
ride_id uuid Ride ID
passenger_id bigint Passenger's user ID
status text pending / confirmed / cancelled

reviews

Column Type Description
id uuid Unique ID
target_id bigint User being reviewed
author_id bigint User leaving the review
rating int Score (1–5)
comment text Review text

🌐 Deployment

Frontend → Vercel

  1. Connect your repository at vercel.com
  2. Set Root Directory to webapp
  3. Add Environment Variables:
    • VITE_SUPABASE_URL
    • VITE_SUPABASE_KEY
  4. Deploy

Bot → Railway

  1. Create a new project at railway.app
  2. Connect your repository, set Root Directory to bot
  3. Add Environment Variables from .env
  4. Deploy

📱 Connecting the Mini App to the Bot

  1. Open @BotFather/mybots → select your bot
  2. Bot Settings → Menu Button → Configure menu button
  3. Paste your deployed Vercel URL
  4. Done — the menu button now opens the Mini App

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.


📄 License

MIT

Copyright (c) 2025 Oleg Shapran

🫡Credits

Lead Developer - Oleg Shapran (@Smilelife1177) (shapran1177@gmail.com)

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors