Spaces:
Configuration error
Configuration error
|
Download FULLSTACK_README.md from fabrit/assets-tracker-api: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/spaces/fabrit/assets-tracker-api/resolve/main/FULLSTACK_README.md
- Command line
-
hf download hf://spaces/fabrit/assets-tracker-api/FULLSTACK_README.md
-
curl -L -o FULLSTACK_README.md https://huggingface.co/spaces/fabrit/assets-tracker-api/resolve/main/FULLSTACK_README.md
2.03 kB
| # 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 | |