Over the past three weeks, I’ve immersed myself in backend development with Flask, explored RESTful API design, and integrated React for full-stack applications. Here’s a breakdown of my learning journey, key takeaways, and how these skills translate to real-world development.
Week 1: Flask Foundations
Day 1: Flask Fundamentals
Core Concepts: WSGI, routing, request-response cycle.
Hands-on: Built basic Flask apps, handled HTTP methods, and validated fundamentals via quizzes.
Key Insight: Understanding how Flask abstracts low-level web protocols streamlined my backend workflow.
Day 2: Flask-SQLAlchemy & Databases
Database Integration: ORM setup, CRUD operations, migrations with Alembic, and database seeding.
Serialization: Converted SQLAlchemy models to JSON for API responses.
Project Highlight: Built a bookstore app with dynamic querying and RESTful endpoints.
Day 3: Modeling Relationships
Advanced ORM: Implemented one-to-many and many-to-many relationships (e.g., authors ↔ books).
Relationship Serialization: Nested related data in API responses using serialization patterns.
Day 4: Consuming APIs
HTTP Clients: Used requests to fetch data from external APIs (e.g., weather data, GitHub).
Tooling: Tested endpoints with Postman and handled pagination/rate limiting.
Day 5: Building APIs
RESTful Design: Created GET/POST/PATCH/DELETE endpoints for resource management.
Lab: Built a "Chatterbox" messaging API with error handling and validation.
Week 2: Advanced Backend & Full-Stack
Day 6: REST APIs with Flask-RESTful
Structured Endpoints: Leveraged Flask-RESTful for clean resource-based routing.
HATEOAS: Explored hypermedia-driven responses using Marshmallow.
Day 7: Data Validation
Constraints: Database-level validations (e.g., unique, nullable).
Application Logic: Added custom validations (e.g., email format, password strength).
Day 8: Full-Stack Integration
React + Flask: Served React apps from Flask routes and managed API proxying.
Form Handling: Implemented form validation with Formik.
Day 9: Authentication
IAM Workflow: Cookie/session management, password hashing with bcrypt, and route protection.
Lab: Built a user auth system with login/logout and role-based access control.
Day 10: Deployment
CI/CD: Deployed Flask APIs and React apps to Render.
Database Hosting: Configured PostgreSQL on Render and managed environment variables.
Key Projects & Challenges
Phase 4 Code Challenges:
Superheroes API: Modeled hero-team relationships with CRUD operations.
Pizza Restaurants: Many-to-many relationships (restaurants ↔ pizzas).
Late Show: Full-stack deployment with React frontend and Flask backend.
Mock Challenges: Solved problems like "Camping Fun" (gear rental API) and "Cosmic Travel" (interstellar booking system).
Capstone Project: A full-stack application with auth, database relationships, and RESTful endpoints (https://github.com/Chenzie2/Coursify-Frontend).
Lessons Learned
Start Simple: Flask’s minimalism makes it perfect for rapid prototyping.
ORM Power: SQLAlchemy abstracts complex SQL while maintaining flexibility.
Decouple Frontend/Backend: Serve React independently for scalability.
Security First: Always hash passwords and validate incoming data.
Deployment ≠ Afterthought: Configure production settings (CORS, env vars) early.
What’s Next?
Explore Flask asynchronous support for high-I/O apps.
Dive deeper into containerization (Docker) and load balancing.
Experiment with GraphQL as an alternative to REST.
This phase transformed how I approach backend systems. Flask’s "micro" framework forced me to understand each layer of the stack—no magic, just deliberate design.
Top comments (0)