SuriRate is a Progressive Web App (PWA) built with Next.js 15 that compares USD and EUR exchange rates from major Surinamese banks. The application scrapes rates from 6 banks, caches them using Next.js revalidation, and provides real-time comparisons with offline support.
- Finabank - HTML scraping with regex patterns
- Central Bank of Suriname (CBvS) - Table scraping from HTML
- Central Money Exchange (CME) - JSON POST API
- Hakrinbank - Exchange page table parsing
- De Surinaamsche Bank (DSB) - JSON API endpoint
- Republic Bank - Table scraping with column mapping
- 🔄 Real-time Rate Comparison - Compare USD and EUR exchange rates across 6 major banks
- ⚡ Fast Performance - Next.js caching with 12-hour revalidation
- 📱 PWA Support - Works offline with
next-pwa - ⏰ Real-time Updates - Fresh rates with Next.js revalidation
- 🎯 Best Rate Highlighting - Automatically identifies the best buy/sell rates
- 📊 Analytics - Optional PostHog integration for usage tracking
- 🚀 Modern Stack - Built with Next.js 15, React 19, TypeScript, and Tailwind CSS
- Node.js 20+
- pnpm (configured via
packageManagerin package.json)
# Clone the repository
git clone https://github.com/ragnarok22/suri-rate.git
cd suri-rate
# Install dependencies
pnpm install
# Start development server
pnpm devOpen http://localhost:3000 to view the app.
Create a .env.local file in the project root:
# Required for Vercel deployment
ENABLE_EXPERIMENTAL_COREPACK=1 # Required for pnpm on Vercel
# Optional - Analytics
NEXT_PUBLIC_POSTHOG_KEY=phc_xxxxx # PostHog analytics key
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.comNote: Cache duration is hardcoded to 12 hours in the codebase (utils/index.ts).
pnpm dev # Start development server with Turbopack
pnpm build # Build for production
pnpm start # Start production server
pnpm test # Run tests in watch mode
pnpm test --run # Run tests once
pnpm lint # Run ESLint
pnpm prettier # Format code with PrettierThe project uses Vitest for testing:
pnpm test --run # Run all tests once
pnpm test # Run tests in watch modeThe project is optimized for Vercel deployment:
- Automatic PWA Generation - Offline support via
next-pwa - Next.js Caching - Built-in 12-hour revalidation with service worker caching
- Environment Variables - Configure in Vercel dashboard
- Frontend: Next.js 15 with App Router, React 19, TypeScript
- Styling: Tailwind CSS 4 with class-variance-authority
- Data Fetching: Custom fetch wrapper with axios for bank APIs
- Web Scraping: Cheerio for HTML parsing
- Caching: Next.js revalidation with service worker caching
- PWA: next-pwa for offline functionality
- Analytics: PostHog integration
This project is private and not licensed for public use.
Rates provided by this application are for informational purposes only. Always verify exchange rates directly with your bank for official values.