Skip to content

Janja-Programmers/aos

Repository files navigation

AOS (Africa Online Stores)

A multi-vendor marketplace platform enabling users to buy, sell, post short videos, go live, and communicate via chat and in-app calls across multiple countries.


πŸš€ Installation

Install the app using bench:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app aos

βš™οΈ System Requirements

Install required system packages:

sudo apt update
sudo apt install -y libgl1 ffmpeg build-essential python3-dev curl wget

Why these are required:

  • libgl1 β†’ required for background removal (rembg)
  • ffmpeg β†’ video processing (shorts)
  • build-essential β†’ build Python dependencies
  • python3-dev β†’ required for some Python packages

🐳 External Services Setup (Docker)

AOS depends on external services. Run them using Docker Compose.


πŸ“ Step 1: Navigate to app folder

cd apps/aos

πŸ“„ Step 2: Create environment file

cp .env.example .env

Update values inside .env as needed.


▢️ Step 3: Start services

docker compose up -d

🌐 Services Overview

Vector Search (Image Search)


Object Storage (Shorts)


Realtime (Calls & Live Streaming)

  • LiveKit
  • WebSocket: ws://localhost:7880

Push Notifications

  • Firebase Cloud Messaging
  • No server required (managed by Firebase)

πŸ” Firebase Setup (Push Notifications)

  1. Go to Firebase Console
  2. Create project
  3. Download service account JSON
  4. Add to site_config.json:
{
  "firebase_service_account": "/absolute/path/to/service-account.json"
}

⚠️ Do NOT commit this file to GitHub.


πŸ“§ Email Setup (Required)

Configure Email Account in Frappe:

  • SMTP server
  • Email credentials
  • Enable outgoing mail

Used for:

  • OTP verification
  • Password reset
  • System notifications

βš™οΈ AOS Settings Configuration

After installing the app, configure AOS Settings in Frappe:


Qdrant

host: 127.0.0.1
port: 6333
collection: ads

MinIO

endpoint: 127.0.0.1:9100
access_key: from .env
secret_key: from .env
public_base_url: http://127.0.0.1:9100
secure: 0

LiveKit

endpoint: ws://127.0.0.1:7880
api_key: from .env
api_secret: from .env

▢️ Running the App

bench start

πŸ§ͺ Testing

bench run-tests --app aos

πŸ“ Project Structure

apps/aos/
β”œβ”€β”€ aos/                     # Main application code
β”œβ”€β”€ docker-compose.yml      # Dev/infra services
β”œβ”€β”€ .env.example            # Environment variables template
β”œβ”€β”€ infra/
β”‚   └── livekit/
β”‚       └── livekit.yaml    # LiveKit config
β”œβ”€β”€ pyproject.toml
└── README.md

πŸ” Security Notes

  • Do NOT commit .env
  • Do NOT commit Firebase JSON
  • Always use strong passwords in production

🧠 Production Notes

This docker setup is intended for:

  • Local development βœ…
  • Testing βœ…
  • Single-server deployments βœ…

For high-scale production:

  • Separate services into different servers
  • Add SSL (HTTPS)
  • Use reverse proxy (nginx)

🀝 Contributing

cd apps/aos
pre-commit install

Tools used:

  • ruff
  • eslint
  • prettier
  • pyupgrade

πŸ”„ CI

GitHub Actions workflows:

  • CI β†’ installs app and runs tests
  • Linters β†’ static analysis

πŸ“„ License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors