1 of 17

Oasis Accelerator Series

Build Session 3 - Structuring a Maintainable Codebase

2 of 17

Agenda

Designing for Maintainability.

Structuring the Codebase.

Maintaining the Codebase.

3 of 17

Designing for Maintainability

4 of 17

.

What is Maintainable Code?

  • Easy to understand
  • Easy to modify
  • Easy to test
  • Easy to debug
  • Consistent and predictable

5 of 17

.

Separation of Responsibilities

  • Each component has one clear role
  • Business logic stays separate
  • UI handles presentation
  • Database code handles persistence
  • Smaller components are easier to change

6 of 17

.

Keep Code Loosely Coupled

  • Minimize dependencies
  • Avoid circular dependencies
  • Limit shared state
  • Changes stay localized
  • Use clear interfaces between components

7 of 17

.

Avoid Overengineering!

  • Start with simple solutions
  • Don't abstract too early
  • Avoid unnecessary layers
  • Add complexity when needed

8 of 17

Structuring the Codebase

9 of 17

.

Organize Code by Feature

  • Keep related code together
  • Make code easy to find
  • Reduce unrelated dependencies
  • Scale structure with the application

10 of 17

.

Use Clear Layers

  • Controller → handles requests
  • Service → business logic
  • Repository → data access
  • Each layer has a clear purpose

11 of 17

Maintaining the Codebase

12 of 17

.

Write Testable Code

  • Keep functions small
  • Use clear inputs and outputs
  • Isolate external services
  • Avoid hidden state
  • Test behavior, not implementation

13 of 17

.

Recognize Code Smells

  • Large functions
  • God classes (single class has too many responsibilities)
  • Duplicated logic
  • Deep nesting
  • Circular dependencies
  • Unclear naming

14 of 17

.

Refactoring

  • Remove duplication
  • Simplify complex logic
  • Break up large components
  • Improve unclear abstractions
  • Don't let technical debt accumulate

15 of 17

Questions?

16 of 17

Project Leads, please now create and assign a ticket

Let’s put this into practice 🚀

17 of 17

Build time 🛠️