My development folder structure
Tags: productivity, workflow
Published: 2020-01-02 22:58:15

# A brief intro to my development folder structure
I have used the following folder structure for a few years now to keep my various main and side projects organised. I have found it to be pretty easy to work with and keep clean while still keeping most of the files I care about in one place.
Just note that I only use this for my personal and side projects, I have a different workflow in my "real" work which better fits the style of my workflow in my day-job.

# 1. The dev folder
First, I start from one "dev/" folder which lives in my ~home directory on each of my development machines.
This allows me to navigate quickly to the root of all my development-related stuff when I open a file explorer or terminal. To get into this folder once my terminal has launched, it's always as simple as a quick:
```
cd dev/
```
and already, I'm almost where I need to be to look at or do whatever it is I'm doing.

  On my Windows machine, I also keep a shortcut to this folder on my desktop so I can jump right into the file explorer when I've finished booting and logging in:
  ![Windows desktop shortcut to my dev/ folder](https://thepracticaldev.s3.amazonaws.com/i/b8a22cnbc0q1hb5r48qj.PNG)

# 2. The inner folders
Within my dev/ folder I have 6 main subdirectories:
  1. archive
  2. config
  3. resources
  4. side
  5. uni
  6. working

![the contents of ~/dev/ directory from the terminal](https://thepracticaldev.s3.amazonaws.com/i/ep37qpco9tnamg12a7f6.PNG)

You may already be able to guess what lives in each of these directories but I'll explain what I use them each for in order of importance below:

## working/

The working folder is the place to be if you're a project of mine! It's the place where my primary personal projects I aim to give the most time to live. This includes my portfolio website, my passion project, and other projects I plan to make available online sometime soon.
Each of the directories in the working folder are themselves a git repository, usually hosted on github, meaning I can clone these and get straight back to working really easily if I need to work on them on a different machine.

## config/
The config folder holds things I need to set up my environment. Usually this consists of things like a checked out version of my dotfiles repository and things like workspace files for Visual Studio Code. Other things I keep in here are themes and setup files for whichever terminal I'm using (currently conemu).

## uni/
This folder is where any code-based university work goes while I'm working on it. I like to keep this separated from my main working folder as I try to keep a distinction between my university work and my personal projects. This is useful for both time-management and helping keep my uni-time thoughts and my free-time thoughts separated. Through this, I am able to remove myself from a studying mindset when I need to and focus on something I want to work on *for me*.

Within the uni folder there is a directory for each year of my course, named simply "1", "2", and "3", and within these are separate folders for each module I am sitting at a given time, so I can quickly move into the relevant year and module with a few keystrokes after `cd uni/`.


![the contents of the ~/dev/uni/ directory from the terminal](https://thepracticaldev.s3.amazonaws.com/i/4q6hemvswnlwt6sntuv1.PNG)
## side/
Another mindset-separating folder, this time housing any projects which fit either of the following criteria:
- It's a very small project which I plan on building in a few days.
- I start working on it and want to finish it in the future but have no time to right now so I just about manage a project skeleton and then forget about it.

My main aim with this folder is to encourage me to focus on a few main projects at a time and hold myself back from getting distracted by starting working on every idea I come up with and never finishing anything.
You could probably liken this folder to a "someday-maybe" list of projects I want to try out at some point.

## resources/
The resources folder is similar to the config folder but has more meaty requirements and resources for whatever I'm working on. For example, a portable program or library I want to use to experiment with something, i.e. processing, ElasticSearch, or PostgreSQL, which has to live somewhere but I don't want to keep the unzipped package taking up space on my desktop.


## archive/
My archive folder is the least important directory in this list for me since it has more recently become slightly obsolete. When I started experimenting with writing code working on my own personal projects, I wanted somewhere to keep all my work, even when I wasn't actively working on it anymore. In the very beginning this was in a big-old zip folder which I occasionally re-uploaded to my Google Drive, but that was then, and now I know more.

I now have almost all of my old previous projects stored in git, hosted on GitHub (mostly in private repositories at the minute; sorry, I'll make something worth sharing one day, I promise!)

This means that not only do I keep the finished product of my projects when I'm done with them but also all the work I did on the way to get there. Additionally, I know they're always kept somewhere safe where I don't need to manually backup every month.

Occasionally a project I'm done with will still get `mv working/old-project archive/`ed just to act as a temporary project-recycling bin, but more often than not, I can safely just delete the directory after checking the most recent changes have been pushed. 

# 3. Conclusion
That wraps up a brief tour of the development directories I use. At the minute, it works for me and it's the most logical I've used so far.

I'm sure there will be future updates to this as my development workflow changes but I'm eager to hear your suggestions and what works best for you, so let me know if there's anything you think could make this simpler 👌


Cover Photo by [Maksym Kaharlytskyi](https://unsplash.com/@qwitka?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash