Understand how Clojure namespaces map to files, how src, test, and resources fit on the JVM classpath, and how to navigate a repository without looking for one class per file.
Clojure projects look simple on disk, but there are a few conventions that are worth learning early. Once you can glance at a repository and predict where a namespace lives, you will read code much faster.
src/ holds production code; test/ holds tests; resources/ holds classpath resources.my-app.core -> my_app/core.clj).| Clojure file or folder | Java-oriented interpretation |
|---|---|
src/my_app/core.clj |
Source file for namespace my-app.core |
test/my_app/core_test.clj |
Test namespace, usually requiring the source namespace |
resources/ |
Classpath resources, like Java src/main/resources |
deps.edn or project.clj |
Dependency/build configuration |
dev/ or user.clj when present |
REPL helper code, not necessarily production code |
Java mental model: namespaces are not classes, but the “package-to-path” navigation skill transfers almost directly.
This section gives you the minimum structure you need to follow real projects and avoid “where is this code actually loaded from?” confusion.