Article

Escaping Development Limbo: The "Vertical Slice" Framework

DKDhaval Kurkutiya
10 min read
Escaping Development Limbo: The "Vertical Slice" Framework

When developers build a big app, they usually do it like this:

  • First, spend weeks building the entire database
  • Then, build all the backend API endpoints
  • Then, finally start the frontend

This feels logical. But it fails. By the time you start the frontend, your brain is overloaded. You have 30+ API endpoints, complex database tables, authentication logic — all sitting in your head at once. You forget things. You make mistakes. When you finally try to connect the frontend and backend together, they don't match. Wrong data formats, missing fields, broken types. You spend days just fixing connection bugs instead of building features.

This is called Integration Collapse — two big separate halves that don't fit together.


The Better Way — Vertical Slices

Instead of building everything horizontally, you build one complete feature at a time — from database to UI — before touching the next feature.

Your brain only holds one feature at a time. Much easier. Much fewer bugs. And you always have something working to show.


The 4 Steps for Every Feature

Step 1 — Write the Contract

Before writing any code, decide exactly what data your API will return. Write it as a simple JSON structure. Both frontend and backend now agree on the data shape before either side is built.

Step 2 — Build the API

Build only the database table and backend API for this one feature. Test it in Postman or Swagger. Make sure it returns exactly the JSON you defined in Step 1.

Step 3 — Build the UI with Fake Data

Build the frontend UI using hardcoded fake data. No API calls yet. Focus purely on design — layouts, animations, states. No async bugs to worry about.

Step 4 — Connect Everything

Replace fake data with real API calls using React Query or SWR. Wire up buttons and forms. Run the linter. Build the production bundle. If it compiles with zero errors — this feature is locked. Move to the next one.


Real Example — Building Rapkeo Edutech Platform

Let's say you are building Rapkeo, an online learning platform with students, courses, teachers, and assignments.

First, list every feature:

  • User Login / Signup
  • Student Dashboard
  • Course Listing Page
  • Course Detail + Video Player
  • Assignments
  • Progress Tracking
  • Teacher Portal
  • Notifications
  • Admin Panel

That's your map. Now you know the full scope before writing a single line of code.

Pick the right starting feature.

Don't start with Login. Don't start with Admin Panel. Start with the core feature — the one thing without which the app makes no sense. For Rapkeo, that's Course Listing. Without courses, there is no platform.

Apply the 4 steps to Feature 1 — Course Listing:

Step 1, write the contract:

code
{
  "courses": [
    {
      "id": 1,
      "title": "React for Beginners",
      "instructor": "Rahul Shah",
      "thumbnail": "url",
      "price": 999,
      "rating": 4.5,
      "totalStudents": 1200
    }
  ]
}

Step 2, build the API. Create the Courses table. Write GET /api/courses. Open Postman. Does it return exactly this JSON? Yes? Move on.

Step 3, mock the UI. Build a beautiful course card grid in the frontend using the JSON above as a hardcoded static array. Make it look great — thumbnails, ratings, price badges, hover effects. Zero API calls yet.

Step 4, connect. Replace the static array with a React Query hook calling GET /api/courses. Build successfully? Course Listing is locked.

The recommended order for Rapkeo:

  1. Course Listing
  2. Course Detail + Video Player
  3. Login / Signup
  4. Student Dashboard
  5. Assignments
  6. Progress Tracking
  7. Teacher Portal
  8. Notifications
  9. Admin Panel

Each feature builds on the previous one. The order matters.

Every morning, you should be able to answer one question: Which slice am I on, and which of the 4 steps am I on right now?


How Big Companies Do This

This is not just theory. The biggest companies in the world do exactly this — just at a larger scale.

Google engineers commit in small, layered changes and hide unfinished features behind feature flags — the code is live in production but invisible to users until the team turns it on. Amazon's Jeff Bezos created the two pizza rule — no team should be so large it cannot be fed by two pizzas. Each small team owns one feature area completely, end to end. Spotify organizes engineers into squads where each squad owns one particular slice of the product, functions like a mini startup, and ships independently. Meta enforces strict TypeScript contracts between frontend and backend on every single commit, because one wrong type can cause an incident touching billions of users.

The only difference between you building Rapkeo alone and Google building Search is the number of people. The principle is identical — small focused ownership, contract first, one slice at a time.


Handling Large Projects — The Problems Nobody Talks About

When your project grows to 50+ features and multiple developers, new problems appear that the basic vertical slice approach does not address on its own. Here is how to handle each one.


Problem 1 — Too Many Features to Track

When you have 50 features, you cannot keep a mental list. Before writing any code, split every feature into three buckets:

Core — Without these the app cannot function. Build these first no matter what.

Important — These make the app genuinely good. Build these second.

Nice to have — These make the app great but are not required for launch. Build these last, or cut them entirely if time runs short.

For Rapkeo:

Core — Course Listing, Course Detail, Video Player, Login, Student Dashboard

Important — Assignments, Progress Tracking, Teacher Portal

Nice to have — Notifications, Admin Analytics, Referral System, Certificates

This bucketing solves the most common cause of project failure — running out of time and having nothing complete. If you run out of time, your core always works and you always have something shippable.


Problem 2 — Multiple Developers Conflicting

When multiple developers work simultaneously, three things break constantly — database migrations conflict, frontend and backend disagree on data shapes, and half-finished features break each other.

Fix this with three rules:

Rule 1 — Write all contracts on Day 1 together. Before anyone writes a single line of feature code, the whole team spends one day writing every API contract. Every feature's JSON shape is defined and agreed. Now Developer A building Course Listing and Developer B building Login cannot surprise each other with unexpected data formats.

Rule 2 — One migration at a time. Database schema changes are the most dangerous operation in a team project. Never let two developers change the database schema simultaneously. One person makes the migration, pushes it, everyone pulls and runs it. Only then can the next person touch the schema. This single rule eliminates 80% of team database conflicts.

Rule 3 — Use feature flags. When Developer A finishes Course Listing but Developer B's Login is still in progress, you do not want unfinished Login breaking the whole app in production. Feature flags let you merge a slice into the main codebase while keeping it invisible to users. Every slice can be merged when its code is clean, even before it is ready for users to see.


Problem 3 — No Visibility into Progress

On big projects, the most common complaint is nobody knows what is done, what is in progress, and what is blocked. Fix this with a simple tracking table. Update it every day:

FeatureContractAPIMock UIConnectedStatus
Course ListingDoneDoneDoneDoneLocked
LoginDoneDoneIn ProgressNot startedIn Progress
AssignmentsDoneNot startedNot startedNot startedNot started
Teacher PortalNot startedNot startedNot startedNot startedNot started

Any team member or stakeholder can look at this table at any moment and know exactly where every slice stands. No lengthy status meetings needed.


Problem 4 — Shared Code Nobody Owns

Some things are used by every slice — authentication middleware, file upload handling, error handling, API client setup, TypeScript base types. If you skip this and every developer builds their own version, you end up with four different auth implementations and three different ways to handle errors.

Fix this by spending the first 2 to 3 days of the project — before any feature slice starts — building shared infrastructure:

  • Project folder structure agreed by the whole team
  • Database connection and base configuration
  • Auth middleware that every API route can use
  • Base API client for the frontend with error handling built in
  • Shared TypeScript types folder
  • CI/CD pipeline so every push is automatically tested

Think of this as the foundation of a house. Once the foundation exists, every developer can build their slice on top of it independently without duplicating work or conflicting with each other.


Problem 5 — When to Start the Mobile App

In a large project, do not start mobile development until all of the following are true:

  • All core features are locked
  • Auth is working end to end
  • At least 2 to 3 important features are done and stable

That is roughly 60 to 70 percent of the web app. At that point your backend is battle-tested, your API contracts are proven in production, and your TypeScript types are stable. Starting mobile now means you focus entirely on UI — not fighting backend bugs at the same time.

Use React Native with Expo. Because both Next.js and Expo run on TypeScript, you share your DTO interfaces, Zod validation schemas, and API client code between web and mobile. Write once, use in both places. One backend serves everything.


Problem 6 — Getting Lost Mid-Project

This happens to every developer on long projects. You open your laptop, stare at the screen, and do not know what to work on. You start jumping between features. Nothing gets finished.

Fix this with one daily habit. Every morning, before opening any code editor, answer these two questions in writing — even one sentence each:

"Which slice am I on today?"

"Which of the 4 steps am I on right now?"

If you cannot answer both questions clearly, you are not ready to write code yet. Spend 10 minutes reviewing your tracking table first. Only when both answers are clear do you open the editor.

This single habit eliminates 90 percent of the "lost mid-project" feeling. You always know exactly where you are and what the next action is.


The One Rule to Remember

Finish one thing completely before starting the next.

Database to UI, one feature at a time. This works whether you are a solo developer building a small tool or a team of 20 building an enterprise platform. The discipline of the vertical slice is what separates developers who always have something working to show from developers who are always "almost done" but never ship.