DEV Community

Cover image for I Built a Mock API Platform in 2.5 Months (Django + React + Redis + PostgreSQL)
Marcus
Marcus

Posted on

I Built a Mock API Platform in 2.5 Months (Django + React + Redis + PostgreSQL)

Ever needed a fake REST API for testing but didn't want to spin up an entire backend? That's exactly why I built MockMyData.io.

What It Does

MockMyData lets developers generate mock REST API endpoints. When you sign up, you get a subdomain and API key. Then you define your data schema (field names and types) to create your endpoints.

You can either:

  • Enter custom JSON - Full control over your mock data
  • Auto-generate records - MockMyData creates realistic data based on your field types

Want to try it? Head to MockMyData.io - you can generate a demo mock API right from the landing page and start making requests immediately. No sign-up required.

Perfect for:

  • Frontend development without waiting for backend teams
  • Testing and prototyping
  • Demo applications
  • Learning API integration

The Journey: 2.5 Months Solo

I went from concept to launch in about 10 weeks, building everything myself:

Tech Stack:

  • Backend: Django REST Framework
  • Frontend: React with Material-UI
  • Database: PostgreSQL
  • Caching: Redis
  • Payments: Stripe

Technical Challenges I Solved

1. Multi-tier Rate Limiting

Had to implement two types of rate limiting:

  • Daily quotas (Free: limited requests/day, Pro: unlimited)
  • Request throttling (prevents API spam regardless of tier)

Used Redis for tracking API request counts and Django middleware for enforcement. The challenge was making this performant while accurately tracking limits across distributed requests.

2. Custom Subdomain Provisioning

Each new project gets its own subdomain (e.g., yourproject.api.mockmydata.io). Free users get randomly assigned subdomains, while Pro users can choose their own custom subdomain and change it anytime. This required:

  • Dynamic DNS configuration
  • SSL certificate management
  • Routing architecture that scales

3. AI-Powered Subdomain Validation

Built a system to prevent brand impersonation by validating subdomain requests against known brands and trademarks. This protects both users and legitimate companies.

4. Able to handle large Requests Daily

Implemented comprehensive caching strategies and optimized database queries to handle growing traffic without infrastructure costs exploding.

What's Next

Building a Project Generator that lets users export their mock APIs as production-ready code in Django REST Framework, Express, and other popular backend frameworks. This turns MockMyData from just a testing tool into a full development accelerator.

Also launching on Product Hunt on January 14th with special promotional pricing.

Lessons Learned

  1. Ship fast, iterate faster - 2.5 months was aggressive but kept me focused
  2. Rate limiting is harder than you think - especially across multiple tiers
  3. Caching everything - Redis saved my infrastructure costs
  4. Stripe webhooks are your friend - once you understand them

Try It Out

Check out MockMyData.io - there's a free tier to get started.

Would love feedback from the DEV community, especially around:

  • What features would make this more useful for your workflow?
  • Pricing thoughts on the backend code export feature, and what backend you would like to see?
  • Any technical questions about the implementation?

Happy to answer questions about Django, React, or building a SaaS solo!

Top comments (0)