Skip to main content
  1. Projects/

From prototype to layered architecture: smart home system in Python

One of the most complete projects I worked on during my studies was Domoga, a console-based smart home management system.

Unlike simpler projects, this one was not static. It evolved through multiple stages, transitioning from a basic prototype to a more structured and maintainable architecture.

💻 Repository: https://github.com/Domoga-app/Domoga

📌 Project context #

The goal was to simulate a smart home system capable of:

  • Managing users with different roles
  • Handling devices within a home
  • Controlling access based on permissions

The project was developed across multiple stages, each introducing new concepts and improvements.


📈 System evolution #

🟢 First version: functional prototype #

The initial version:

  • Did not use object-oriented programming
  • Stored data in simple structures (lists and dictionaries)
  • Worked entirely in memory
  • Used a basic console interface

This stage focused on validating the system logic.


🟡 Transition: object-oriented design #

In the next stage:

  • UML diagrams were created
  • Entities and relationships were defined
  • Classes and responsibilities were designed

This marked the shift to an object-oriented approach.


🔵 Final version: layered architecture #

The final version was fully refactored using:

  • Object-oriented programming
  • Layered architecture:
    • DAO (data access)
    • Services (business logic)
    • Views (presentation)
  • MySQL database integration
  • Environment variable configuration
  • Validation and exception handling

Additionally, unit tests were implemented using pytest.


🏗️ Technical decisions #

Key decisions included:

  • Separating responsibilities for maintainability
  • Designing models before implementation
  • Applying a scalable architecture even in a console app
  • Introducing testing early

These decisions helped elevate the project beyond a basic implementation.


🧩 Teamwork #

The project was developed in a team that changed over time, which required:

  • Task redistribution
  • Scope adjustments
  • Simplification of certain features

I contributed across multiple areas, including business logic and overall system improvements.


⚠️ Challenges #

  • Refactoring existing code into OOP
  • Integrating multiple layers without overengineering
  • Keeping consistency between models, database, and code
  • Working within academic deadlines

🚀 What I learned #

This project helped me understand:

  • Software evolution over time
  • Practical object-oriented design
  • Layered architecture
  • Database integration
  • Importance of testing
  • Teamwork in changing environments

💡 What I would improve today #

  • Build an API instead of a console app
  • Apply formal design patterns
  • Expand test coverage
  • Improve error handling and logging
  • Containerize the application (Docker)

🧠 Conclusion #

This project marked a turning point in my learning journey, shifting from simple implementations to thinking in terms of architecture, scalability, and maintainability.

More than the final result, the most valuable part was understanding how a system evolves over time.

Gerardo Catalas
Author
Gerardo Catalas
Focused on backend development, with hands-on experience in C# (.NET) and SQL Server. Currently expanding my skills through continuous learning and personal projects.