Practice DSE trading risk-free β for students and for new investors moving towards the stock market.
StockSimulatorBD is a risk-free paper-trading simulator for the Dhaka Stock Exchange (DSE). It mirrors real market conditions β live prices, T+1 settlement, broker commission, market hours β using a virtual, non-monetary trading balance, so students and first-time investors (including people moving from safer instruments like Sanchayapatra or fixed deposits) can build confidence before risking real capital.
The web app is a full PWA. A TWA-wrapped Android APK is also published as a GitHub Release for a native-feeling install β search this repo's Releases page, or use the badge below, to get it.
| Requirements | Android 8.0+ |
| Package | tech.stocksimulator.zaifears |
| Notes | Not built by this repo's own build pipeline β packaged via PWABuilder as a Trusted Web Activity and distributed through this repo's Releases. The badge link above always resolves to the newest release. |
| π | Live DSE Prices | Market data is scraped from the DSE archive (api/dse_chart.py, api/market_sync.py) and cached in Firestore, including candlestick charts on each stock's page. |
| π | Server-Side, Tamper-Proof Trades | Every BUY/SELL runs in an authoritative Firestore Admin SDK transaction (app/api/simulator/trade) β price, commission, and the T+1 rule are all re-derived and enforced server-side, not trusted from the client. |
| π | Market Calendar | Bangladesh public holidays and DSE trading hours (10:00β14:15, Fri/Sat weekend) are enforced on both client and server. |
| π° | Virtual Currency via bKash | Recharge your simulator balance through an admin-reviewed bKash flow. Coins have no real-world monetary value β they're for practice only. |
| πΎ | Offline-Capable PWA | A custom service worker keeps the app usable with poor connectivity; installable on desktop and Android. |
| Tier | Price | Who it's for | Key Capabilities |
|---|---|---|---|
| Bro Tier | Free forever | Beginners, students, cautious learners | 10,000 welcome coins, live DSE prices, candlestick charts, real-time portfolio holdings, and basic order history. |
| Boss Tier | ΰ§³20 / Month (31 days) ΰ§³99 / 6 Months (185 days) |
Active learners & disciplined paper traders | Portfolio Insights & Risk Radar (banked realized P&L, 21-sector DSE exposure, concentration risk alerts, 0.4% commission tracking), +10% free coins bonus on every recharge, and gold profile recognition. |
Security & Privacy by Design: Portfolio Insights are strictly isolated in memory and the DOM for Boss users only. Non-Boss accounts receive zero insight data in their React tree, preventing any client-side inspection bypass.
| Area | Description |
|---|---|
| Auth | Firebase Auth β email/password, Google Sign-In, and Google One Tap. Real-time onSnapshot tier synchronization. |
| Boss Tier Hub | /boss β transparent 1-month and 6-month plans, 14-feature audit comparison, mobile-friendly payment flow via bKash. |
| DSE Learning Blog | Headless-CMS-powered (Contentful) articles on BO account opening, brokers, and DSE investing basics. |
| Admin Command Center | /admin & /admin/tier β 1-click Boss tier approvals/rejections, user email/UID search & manual grant, recharge queue, tamperproof security audit, and site analytics. Firebase custom-claim gated. |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Framework Next.js 16 (App Router) β
β Language TypeScript 5 (strict) β
β Styling Tailwind CSS 3 β
β UI React 19 + Lucide Icons β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Backend / DB Firebase Firestore + Firebase Auth β
β Market Data Python serverless scrapers (Vercel) β
β Content Contentful (headless CMS, blog) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Monitoring Sentry + Vercel Analytics/Speed Insights β
β Performance Service Workers (PWA) + bundle analysis β
β Deployment Vercel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js β see
.nvmrcfor the exact version - pnpm (package manager)
- Git
- A Firebase project (Auth + Firestore + a service account for the Admin SDK)
# 1. Clone & enter
git clone https://github.com/zaifears/StockSimulatorBD.git
cd StockSimulatorBD
# 2. Install dependencies
pnpm install
# 3. Configure environment
# Create .env.local with your Firebase (client + admin), Contentful,
# reCAPTCHA, and Resend credentials. There's no .env.example in this repo -
# grep the codebase for `process.env.` to see every variable in use.
# 4. Launch dev server
pnpm devNote:
api/dse_chart.pyandapi/market_sync.pyare Python serverless functions deployed by Vercel β they don't run undernext dev, so live chart/market data only works against a real Vercel deployment (orvercel dev).
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm type-check |
Run TypeScript type checking |
pnpm lint / pnpm lint:fix |
Run ESLint |
pnpm analyze |
Analyze bundle size (webpack bundle analyzer) |
pnpm perf-test |
Lighthouse + bundle-size check against production |
pnpm security-audit |
pnpm audit at moderate severity and above |
This project is licensed under the MIT License β see the LICENSE file for details.
π Ready to master the market?
Visit Live Simulator Β Β·Β Report Issue Β Β·Β Contact
Built with β€οΈ by zaifears