Audiora is a Django-based API for a music and video streaming platform that connects content creators with users. The platform allows creators to run campaigns for their content and rewards users for streaming.
- User registration and authentication with JWT
- Email verification
- User profiles with creator/regular user roles
- Password reset functionality
- Digital wallet for both creators and users
- Secure transactions with PIN verification
- Top-up functionality via Paystack integration
- Withdrawal to bank accounts
- Transaction history
- Creators can create music or video campaigns
- Campaign funding from creator's wallet
- Campaign analytics (streams, balance)
- Automatic campaign deactivation when balance is depleted
- Users earn rewards for streaming content
- Progress tracking for streams
- Reward distribution based on view percentage
- Session-based playback tracking
- Backend: Django, Django REST Framework
- Database: PostgreSQL (configured via DATABASE_URL)
- Authentication: JWT (JSON Web Tokens)
- Payment Integration: Paystack
- Deployment: Google Cloud Platform (App Engine)
- Documentation: Swagger/ReDoc
audiora/
├── audiora/ # Main Django project folder
├── users/ # User management app
├── wallet/ # Wallet and transaction management
├── campaign/ # Campaign and streaming functionality
├── templates/ # Email templates
├── media/ # User uploaded files
├── requirements.txt # Project dependencies
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
└── app.yaml # Google App Engine configuration
POST /api/user/register/- Register a new userPOST /api/user/login/- User loginGET /api/user/profile/- Get user profilePUT /api/user/profile/- Update user profilePOST /api/user/change-password/- Change password
GET /api/wallet/- Get wallet informationPOST /api/wallet/top-up/- Top up walletPOST /api/wallet/withdraw/- Withdraw fundsGET /api/wallet/balance/- Get wallet balancePOST /api/wallet/set-pin/- Set wallet PINGET /api/wallet/transactions/- Get transaction historyGET /api/wallet/bank-accounts/- Get bank accountsPOST /api/wallet/bank-accounts/- Add bank account
POST /api/campaign/create/- Create a campaignGET /api/campaign/- List active campaignsGET /api/campaign/creator/- List creator's campaignsPOST /api/campaign/<id>/fund/- Fund a campaignPOST /api/campaign/<id>/start-playback/- Start streaming a campaignPOST /api/campaign/<id>/update-progress/- Update stream progress
- Python 3.9+
- PostgreSQL
- Docker (optional)
Create a .env file with the following variables:
DEBUG=1
DATABASE_URL=postgres://user:password@localhost:5432/audiora
PAYSTACK_SECRET_KEY=your_paystack_secret_key
PAYSTACK_PUBLIC_KEY=your_paystack_public_key
PAYSTACK_CALLBACK_URL=https://yourdomain.com/api/wallet/callback/
FRONTEND_URL=https://yourdomain.com
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
EMAIL_HOST_USER=your_email@example.com
EMAIL_HOST_PASSWORD=your_email_password
- Clone the repository
git clone https://github.com/yourusername/audiora.git
cd audiora- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Run migrations
python manage.py migrate- Start the development server
python manage.py runserverdocker-compose upThe project is configured for deployment to Google App Engine:
# Authenticate with Google Cloud
gcloud auth login
# Deploy to App Engine
gcloud app deploy --project audiora-446612API documentation is available at:
- Swagger UI:
/swagger/ - ReDoc:
/redoc/