Search⌘ K
AI Features

Understanding Folder Structure and Application Architecture

Explore how to define an evolving folder structure and application architecture in Deno. Understand key principles like decoupling, testability, and separation of concerns to create flexible, maintainable web applications with clear module boundaries. This lesson guides you through organizing project code for scalable development.

Define a folder structure

The first thing we need to be aware of regarding the folder structure, especially when starting a project from scratch without a framework, is that it will keep evolving with the project. A folder structure good for a project with a couple of endpoints will not be as good for a project with hundreds of them. This depends on many things, from team size to the standards defined and, ultimately, to preferences.

When defining the folder structure, we must get to a place where we can facilitate future decisions about where to locate a piece of code. The folder structure should provide clear hints on how to make good architectural decisions.

At the same time, we certainly don’t want to create an overengineered application. We’ll create enough abstractions so that modules are very contained and don’t have knowledge outside their domain, but not more than that. This also forces us to build flexible code and clear interfaces. ...