A modern, full-stack demo trading platform for learning crypto trading, built with Next.js 15, React 19, TailwindCSS 4, ShadCN/UI, Next-Auth (Auth.js), Prisma, and SQLite (for local/demo). Production deployments can use PostgreSQL.
- Features
- Tech Stack
- Prerequisites
- Getting Started
- Environment Variables
- Project Structure
- Deployment
- Contributing
- Security
- Future Improvements
- License
- Contact
- Secure registration and login (Next-Auth v5/Auth.js)
- Virtual wallet with $10,000 starting balance
- Real-time Bitcoin price from CoinGecko
- Buy/Sell BTC with instant P&L updates
- Trade history and profile page
- Modern, responsive UI (TailwindCSS 4 + ShadCN/UI)
- Next.js 15 App Router
- React 19
- TailwindCSS 4
- ShadCN/UI
- Next-Auth (Auth.js)
- Prisma ORM
- SQLite (default for local/demo)
- CoinGecko API
- Node.js v18 or later
- npm v9 or later
git clone https://github.com/aaurelions/CryptoTradingSimulator demo-trade
cd demo-tradenpm install- By default, the app uses SQLite for local/demo development. No setup required.
- For production, set your
DATABASE_URLin.envto a PostgreSQL connection string. - Set a strong
AUTH_SECRETin.env.
npx prisma db pushnpm run devVisit http://localhost:3000 to use the app.
Create a .env file in the root directory. Example:
DATABASE_URL="file:./prisma/dev.db" # or your PostgreSQL connection string
AUTH_SECRET="your-strong-secret"
NEXTAUTH_URL="http://localhost:3000"src/app/β Next.js App Router pagessrc/actions/β Server actions for auth and tradingsrc/components/β UI and layout components (ShadCN/UI)src/lib/β Prisma client and utilitiesprisma/β Prisma schema
- Deploy easily to Vercel or Railway.
- For production, set your
DATABASE_URLto PostgreSQL and ensure all secrets are set in your deployment environment. - See Next.js deployment docs for more info.
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes
- Push to your fork and submit a Pull Request
- Never commit secrets (like
AUTH_SECRETor productionDATABASE_URL) to version control. - Use environment variables for all sensitive information.
- Production-ready PostgreSQL support (just update your
.env) - Unit and integration tests (Vitest, Playwright)
- User settings/profile editing
- Multi-asset support (ETH, etc.)
- Leaderboard and social features
- Mobile-first UI polish
- Accessibility improvements
- Better error handling and edge-case UX
- Deployment guides for Vercel, Railway, etc.
MIT
For questions or support, open an issue or contact the maintainer.
