Project Layout (v4.0.0, 2022-07-19)

I'm a polyglot programmer. I work in a variety of languages but mostly in C#, Typescript, and Rust. Every few years, I try a new language to see if I can pick up new ideas or if one “fits” my current mental state better. This is also why I've done a lot dozens of other languages; I would say I know over thirty languages but I'm only a “master” in a handful.

I also flit from project to project. I have my writing and games. I have little one-off programs and ones that I hope will become a major thing. But, like everything else in my life, I'm “gloriously unfocused” on my tasks which means I have to minimize the speed that I get into a project before the muse escapes me.

Over the years, I've come up with a project structure that works across most languages. It is mostly “for me”, but I think there are aspects of that others may enjoy.

Conventions

Throughout this document, // represents the root of the Git repository. So, //src/just/build.just would be the build.just in the ‘src/just’ file under the root.

When I'm referring to a directory, I will include a trailing lash such as //src/ to make a distinct between that and //Justfile which is a file.

Also, I use forward slashes regardless of the operating system, PowerShell can handle both and it doesn't require escaping in most languages.

With HTML paths, I will use // when a link has both a Gemini and HTML server associated with it or explictly say https:// if it is an HTML-only site.

Table of Contents

  • Philosophy is the general guidelines for setting up a project.
  • Just has the tool used to run scripts in projects.
  • Directories describes the preferred directory layout.
  • Setup for setting up a project to make it “easier” to get into it.
  • History describes the historical evolution of my project layout.

License

This book is distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. More info can be found at https://creativecommons.org/licenses/by-nc-sa/4.0/

The preferred attribution for this novel is:

“Project Layout” by D. Moonfire is licensed under CC BY-NC-SA 4.0

In the above attribution, use the following links:

Source

The source of this project can be found on the Moonfire Games forge. Feel free to report any issues, requests for expansion or clarifications. Alternately, you can contact me directly.

Metadata

Categories: