Spaces:
Configuration error
Configuration error
File size: 2,032 Bytes
83bcbe3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | # Price Alert Bot - Full Stack Application
Your Telegram bot has been extended into a full-stack application with web and mobile interfaces.
## Project Structure
```
signals bot/
βββ backend/ # FastAPI backend
β βββ main.py # API server with WebSocket support
β βββ requirements.txt
βββ web-app/ # Next.js web application
β βββ src/app/
β β βββ page.tsx # Dashboard
β β βββ globals.css
β βββ package.json
β βββ tsconfig.json
βββ mobile-app/ # React Native mobile app
β βββ App.tsx
β βββ screens/
β β βββ DashboardScreen.tsx
β β βββ AddAssetScreen.tsx
β β βββ AlertsScreen.tsx
β βββ package.json
β βββ app.json
βββ (original bot files) # Your existing Telegram bot
```
## Running the Application
### 1. Start the Backend
```bash
cd backend
pip install -r requirements.txt
python main.py
```
The API runs on `http://localhost:8000`
**API Endpoints:**
- `GET /assets` - List tracked assets
- `POST /assets` - Add an asset
- `DELETE /assets/{name}` - Remove an asset
- `GET /assets/available` - List available assets
- `WS /ws` - WebSocket for real-time updates
### 2. Start the Web App
```bash
cd web-app
npm install
npm run dev
```
Open `http://localhost:3000`
### 3. Start the Mobile App
```bash
cd mobile-app
npm install
npx expo start
```
Scan the QR code with Expo Go app.
## Features
| Feature | Web | Mobile |
|---------|-----|--------|
| View tracked assets | β
| β
|
| Add/remove assets | β
| β
|
| Real-time prices | β
| β
|
| Alert history | β
| β
|
| Dark theme | β
| β
|
| Push notifications | - | (Configure FCM) |
## Configuration
Update `YOUR_SERVER_IP:8000` in mobile-app/screens/ with your backend server address.
For production, use environment variables:
- `NEXT_PUBLIC_API_URL` for web app
- Store backend URL in mobile app config
|