| .. | ||
| drizzle | ||
| src | ||
| static | ||
| websocket | ||
| .env.example | ||
| .gitignore | ||
| .npmrc | ||
| .postcssrc.json | ||
| .prettierignore | ||
| .prettierrc | ||
| bun.lock | ||
| components.json | ||
| drizzle.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| svelte.config.js | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||
Rugplay Website
This is the main website component of Rugplay, built with SvelteKit. It handles the user interface, trading functionality, and market visualization.
Development
Prerequisites
- 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:
cp .env.example .env
Key variables to configure:
PUBLIC_BETTER_AUTH_URL: Set tohttp://localhost:3002if you want to deployOPENROUTER_API_KEY: Your OpenRouter API key for AI features- AWS credentials (optional but recommended)
Running in Development
npm install
npm run dev
The development server will be available at http://localhost:5173
Building for Production
npm run build
npm run preview
Project Structure
src/routes/: Page components and API endpointssrc/lib/: Shared components and utilitiessrc/lib/components/: Reusable UI componentsstatic/: 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
- Make sure Redis is running
- Start the websocket server (see
websocket/README.md) - Run the website in development mode
- Make your changes
- Test thoroughly
- Submit a pull request