2025-06-23 16:22:32 +02:00
# Rugplay Website
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
This is the main website component of Rugplay, built with SvelteKit. It handles the user interface, trading functionality, and market visualization.
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
## Development
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
### Prerequisites
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
- Node.js (LTS version)
- Redis running in the background
- OpenRouter API key (for AI features)
- AWS S3/B2 Storage (for file uploads)
### Environment Variables
Create a `.env` file based on `.env.example` :
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
```bash
cp .env.example .env
2025-05-21 21:34:22 +03:00
```
2025-06-23 16:22:32 +02:00
Key variables to configure:
- `PUBLIC_BETTER_AUTH_URL` : Set to `http://localhost:3002` if you want to deploy
- `OPENROUTER_API_KEY` : Your OpenRouter API key for AI features
- AWS credentials (optional but recommended)
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
### Running in Development
2025-05-21 21:34:22 +03:00
```bash
2025-06-23 16:22:32 +02:00
npm install
2025-05-21 21:34:22 +03:00
npm run dev
```
2025-06-23 16:22:32 +02:00
The development server will be available at http://localhost:5173
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
### Building for Production
2025-05-21 21:34:22 +03:00
```bash
npm run build
2025-06-23 16:22:32 +02:00
npm run preview
2025-05-21 21:34:22 +03:00
```
2025-06-23 16:22:32 +02:00
## Project Structure
- `src/routes/` : Page components and API endpoints
- `src/lib/` : Shared components and utilities
- `src/lib/components/` : Reusable UI components
- `static/` : Static assets (images, fonts, etc.)
## Features
- User authentication and profile management
- Real-time trading interface
- Market visualization with Treemap
- Leaderboards and statistics
- Integration with websocket server for live updates
## Contributing
2025-05-21 21:34:22 +03:00
2025-06-23 16:22:32 +02:00
1. Make sure Redis is running
2. Start the websocket server (see `websocket/README.md` )
3. Run the website in development mode
4. Make your changes
5. Test thoroughly
6. Submit a pull request