DEV Community

Fiyinfoluwa Ojo
Fiyinfoluwa Ojo

Posted on

RESTful Routes Revisited: Building a More Production-Ready API Structure

Revisiting the Basics : But Better

Day 2 introduced basic routes. Day 10 is about
making those same routes production ready with
richer, more meaningful responses.

The 3 Core Routes

Every API should have at least these 3 routes
from day one:

/ — Home

The entry point of your API. Instead of just
returning "hello", it now returns versioning info,
track and challenge context.

@app.get("/")
def home():
    return {
        "msg": "Welcome to my API",
        "version": "2.0",
        "track": "Backend Development",
        "challenge": "GDGoC Bowen 30-Day Challenge",
        "day": 10
    }

Enter fullscreen mode Exit fullscreen mode

/about — Developer Info

@app.get("/about")
def about():
    return {
        "developer": "Fiyinfoluwa Ojo",
        "track": "Backend Development",
        "stack": "FastAPI + SQLAlchemy + SQLite",
        "progress": "Day 10 of 30"
    }
Enter fullscreen mode Exit fullscreen mode

/status — Health Check with Timestamp

@app.get("/status")
def status():
    return {
        "status": "up",
        "message": "Server is running smoothly",
        "timestamp": str(datetime.utcnow()),
        "uptime": "healthy"
    }

Enter fullscreen mode Exit fullscreen mode

The /status route now returns a live timestamp,
in production this is how monitoring tools check
if your server is alive.

Postman Tests

/home

/about

/status

Lessons Learned

The difference between Day 2 and Day 10 is context.
Same routes, but now they return meaningful data
that reflects a real API: versioning, stack info,
live timestamps. Small details that separate
amateur APIs from professional ones.

Day 10 done. 20 more to go. 🔥

GDGoCBowen30dayChallenge

Top comments (0)