A visual demonstration of API rate limiting built with React and Express. This project showcases how rate limiting protects APIs from abuse and manages server resources.
Rate limiting controls how many requests can be made to an API within a specific time window. This is essential for:
- Preventing API abuse and spam
- Managing server load and costs
- Ensuring fair resource allocation among users
- Protecting against DDoS attacks
- Three different rate-limited endpoints (strict, moderate, generous)
- Real-time visual feedback with progress bars
- Countdown timers showing when limits reset
- Request history log for observability
- Clean, professional UI demonstrating production concepts
- Full-stack implementation with Node.js backend and React frontend
Backend
- Node.js
- Express
- express-rate-limit middleware
- CORS enabled
Frontend
- React
- Vite
- Modern CSS with responsive design
- Frontend: https://rate-limiter-dashboard.vercel.app
- Backend API: https://rate-limiter-api-lcsf.onrender.com
Note: The backend is hosted on Render's free tier, which spins down after periods of inactivity. The first API request after inactivity may take 20-30 seconds to respond while the server restarts. Subsequent requests will be instant. In a production environment, this would use an always-on instance for consistent performance.
- Node.js installed
- npm or yarn
cd backend
npm install
npm startThe API will run on http://localhost:5000
cd frontend
npm install
npm run devThe dashboard will run on http://localhost:5173
GET /api/strict- 5 requests per minuteGET /api/moderate- 10 requests per minuteGET /api/generous- 20 requests per minute
Each endpoint returns:
- Request success/failure status
- Remaining requests in the current window
- Time until the limit resets
- Current usage statistics
- Push code to GitHub
- Create a new Web Service on Render
- Connect your GitHub repository
- Set root directory:
backend - Set build command:
npm install - Set start command:
npm start - Deploy
- Create a new project on Vercel
- Connect your GitHub repository
- Set root directory:
frontend - Add environment variable:
VITE_API_URL=<your-render-backend-url> - Deploy
rate-limiter-dashboard/
├── backend/
│ ├── server.js # Express API with rate limiting
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main React component
│ │ ├── App.css # Dashboard styling
│ │ └── index.css # Global styles
│ ├── package.json
│ └── vite.config.js
└── README.md
For production systems, especially billing and payment processing:
- Rate limiting prevents accidental infinite loops from overwhelming your API
- Protects expensive third-party service calls
- Ensures system stability under load
- Demonstrates understanding of production-ready backend concepts beyond CRUD operations
Built by Lars M. - Computer Science student at UNC Charlotte
Demonstrating production-ready backend concepts including middleware, API design, and resource management.
MIT