
Ask HN: Your project/folder structure for /home/*username* - newsisan
What is your folder structure for your files?<p>There isn't much info on this, but it is a pretty central component of using a computer.
======
edanm
Firstly, everything I'm talking about sits in my Dropbox folder, so for all
intents and purposes Dropbox is my root. I _highly_ recommend doing this - it
makes backups automatic, and you don't have to worry about the backup problem
ever again.

Inside Dropbox, I have several folders relating to various things (Pictures,
Music, Documents, etc.) The most interesting are:

Resources - A folder where I keep all my resources. This basically means my
KeePass database, various fonts and web templates I've bought or collected
over the years, my .emacs and vimrc files, and various other software
resources.

Software - Here I keep all my portable software, the stuff I _have_ to have on
me to use a computer without pulling my hair out in frustration.

Projects - All my software projects (I have a separate "Graphical Projects"
folder for graphical stuff, etc.).

Inside Projects, I have several folders by project name. These are arranged
like so:

ProjectName/ <\- Root, holds any subfolder with anything related to the
project.

ProjectName/db <\- Hold the sqlite database, which I usually use on my
personal computer (most projects are Python/Django).

ProjectName/site_media <\- Holds my static and dynamic media for Django
projects. Static Media holds symlinks to the actual project folders.

ProjectName/repos <\- Holds all the repos.

ProjectName/repos/main <\- The main source code repo. Mercurial is used for
SCM.

ProjectName/repos/design <\- All my design-related documents.

ProjectName/repos/* <\- Any other copies of my main for fixing small bugs and
trying new things. I use Mercurial, so this is a standard practice.

And this is how the actual project folder looks:

ProjectName/repos/main/* <\- All the files related to environment, for
example, my Sublime Text project file, .bat files to automatically start the
Django server, .hgtags and .hgignore, etc. Basically, things that are "meta"
to the project, and not actual source code. Makes for good separation.

ProjectName/repos/main/.hg <\- Mercurial folder

ProjectName/repos/main/project_name <\- The actual source code

Hope that helps.

~~~
kroger
Just curious, what type of account you have on Dropbox?

~~~
edanm
50Gb. 25Gb is enough for all the things I really care about, and 15Gb of that
is my music collection!

I recommend Dropbox every chance I get, since I really think it's an amazing
service. You pay 10$ a month for never having to worry about the backup
problem every again (not to mention the fact that my laptop and other desktop
are always synced). Well worth the money, IMO.

------
akkartik
I'm a neat freak. I don't let cruft accumulate at the top level.

.git of course. Almost everything is under version control, either here or in
its own repo.

.notes for my personal data. Email, chat logs.

.local for programs and configuration. In university we often had our home
directories NFS mounted on linux, sun and IRIX machines. I would install say
vim binaries in all three platforms and my path would include
_$HOME/.local/$UNAME/bin_ to get at the right binaries on each machine.

These days all the action is in _.local/share_. _.local/share/scripts_ is
where I keep my zshrc and so on, .local/share/config has my rcfiles. In
particular .local/share/config/vim is several megabytes of vim configurations
in their own git repo.

.runtime for generated files like zcompdump and whatnot.

I try really hard to minimize dotfiles outside of these, and to keep what is
important somewhere in this hierarchy using environment variables or aliases.
The one directory I can't get rid of is _.ssh_.

www is my homepage at <http://akkartik.name>.

Attic for old projects, usually git repos. Eventually they get burned to DVD
and deleted.

Other than this I usually have one or two projects at any time. They are
usually all I want to see when I _ls_. Lately all there's been here is
readwarp.

------
emarcotte
I'm not sure how important it really is, unless your current layout doesn't
work well for you. That is, most things don't really care where you save your
documents, code or other files.

Using gnome/fedora quite some time I have the standard Desktop, Documents,
Music, etc which sit mostly stagnant due to dropbox.

Some of the interesting others: ~/Dropbox My dropbox folder.

~/prefix where I install various libs and things I'm using. I have my /home on
a seperate partition so I can quickly re-install without losing settings.
Using ~/prefix saves having to re-build the more obscure dependencies/tools I
end up using.

~/projects where I keep checkouts projects I'm working on or using (they get
installed from here into ~/prefix). It is also an eclipse workspace folder,
for the times when I need eclipse.

~/media a symlink to my other drives (DVD, usb devices, etc) so that when I
samba in (rarely) I can easily get to those -- I was too lazy to add shares
for them.

------
jjs

      ~/i     # internal (stuff I made)
      ~/x     # external (stuff I downloaded, etc.)
    
      # exceptions to the above:
      ~/i/collab
      ~/i/mashup
    
      ~/bin
      ~/tmp
    

That's it for top-level directories.

I also really like the (new?) trend of programs keeping their dotfiles in
~/.config/ _program-name_ / _foorc_

~~~
thwarted
I like the ~/x and ~/i. I also usually create a ~/tmp for temporary builds and
stuff that I don't want to have automatically cleaned up, but about a year ago
I changed the default download location in the browsers I use to /tmp -- this
has saved me a lot of space and a lot of time cleaning stuff up or trying to
remember what something is or why I downloaded it -- the system cleans it up,
and if I want to keep it after looking at or evaluating it, the act of
moving/copying it out of /tmp is enough of an effort to help me remember more
about it.

------
d0nk
Most of my coding is hobby or university assignments because of that, my
structure is pretty simple. I also compile a lot of programs and install them
to my local/ prefix within my home directory (minimize system-wide clutter and
restrict apps to just my homedir).

~/src - All of my personal projects, project structure varies depending on
language/type of project. Most directories/project top-levels are scm
directories.

~/build - any apps/libs not made by me that I compile and install local to my
home directory

~/local - items from build/ get compiled with --prefix=${HOME}/local and
install to here, ~/local/bin is in my path

~/www/(sub.domain.tld)/ - apache vhosts for local testing stuff (not
production)

My $PATH contains ${HOME}/local/bin:${HOME}/local/games and in some cases
other local/<bigprogramwithlotsoffiles>/bin entries.

------
3pt14159
~/coding/old # all the files I don't want to work on anymore, but may need to
check for a way I did something in the future

~/coding/test # all the eetsy bitsy little _proving this works_ code

~/Dropbox/coding/#{project_name} # a place for projects small enough not to be
githubbed, but large enough to be dropboxed. Actually I keep my gitubbed
projects here too, my code will never die. Also, my OS setup is a bit weird,
and sometimes it is easier to just have dropbox move something automatically
to/from my native OS, so that's a plus.

For the actual folder structure of the files themselves I try to follow the
typical Rails structure, but honestly for 2 or 3 file projects its all just
there in #{project_name}.

------
die_sekte
Current: Standard Mac OS X structure + Code/ + Games/ + .bin/

On Arch Linux I had: downloads/ files/ games/ media/ projects/ school/ tmp/
work/

Not the most optimal layout. There was a quite a big overlap between tmp/ and
downloads/ and tmp/ and projects/. files/ should have been labeled personal/.
downloads/ got bloated. school/ was the only well organized directory.

When I get my laptop, I plan to use: downloads/ personal/ work/, and depending
on whether I need it, media/. Depending on whether I use fossil, work/repos/.

Perhaps I should set up some script to auto-purge downloads/, but I'm sure
that would lead to disaster.

------
dannytatom
Pretty self explanatory, I think.

    
    
      ~/ ls
      abs  bin  dev  media
    
      ~/ ls dev/
      freelance  opensource  personal  work
    
      ~/ ls media/
      audio  books  games  images  mnt  tmp  torrents  video

~~~
tomjen3
What do you put in abs ?

~~~
dannytatom
Sorry it took so long to reply, there used to be a RSS feed of when somone
replied to your HN comments but I guess it stopped working.

Anyway, it's for Arch Linux packages.
<http://wiki.archlinux.org/index.php/ABS>

------
pontious
I stated using Dropbox to handle some of my needs, but I have implemented it
in a slightly different way than I am seeign most peopel do it. I put the
"real" directory, say Projects under ~/Dropbox/Projects, then I symlink that
back to ~/Projects

lrwxr-xr-x 1 john staff 16 Sep 15 02:33 Projects -> Dropbox/Projects

Is there any reason to do it the other way? That is placing the soft link in
the dropbox folder.

------
shaggy
Being a mac user my $HOME is /Users/$user.

So I have

~/Development/svn_root - my working copy of the svn repo my group uses for all
code related to project work.

~/Documents/$Company_Name/Projects/YYYY - All non-code related project
documents are artifacts are stored there.

~/Documents/Reference - All documentation for everything since it spans time
frames and projects

Everthing is backed up to an external drive via Time Machine as well as synced
somewhere external.

------
cparedes
Mine is extremely messy at the moment; it's currently centered around what
sort of VCS I decide to use / pull code from.

With that said:

~/repos : root directory of all of the repos I'm using.

~/repos/git

~/repos/svn

~/repos/cvs

...

And then underneath those, I have a smattering of repos from various sources.
It's ugly as hell, and I'm really liking this thread mostly so I can get a
better idea on how I should reorganize my stuff. :)

~~~
koenigdavidmj
Have you seen <http://joey.kitenet.net/code/mr/> ? You just put all your repos
in a list and it can keep them all synched at one command, independent of what
type of repo it is.

------
jeffclark
I grabbed a 50gb Dropbox account and put _everything_ in there, so my "home"
is actually /home/username/Dropbox and includes: * Documents * Music * Photos
* Work

Makes working between two computers a piece of cake and provides 100% backup
with versioning. Best $99/year I spend.

------
acabal
~/projects/client-name/client-project.com/

I also have a ~/projects/dev/ folder for administrative-related stuff
(contract templates, accounting, etc.)

Finally I have a soft link to ~/projects/ in ~/Dropbox/ so that whenever I
make a change to any file it's instantly backed up in my Dropbox.

~~~
pbhjpbhj
I drop folder trees (subtrees of home and var-www and the like) into dropbox
as soft links too.

What I could really do with is being able to tell dropbox -"all this tree but
not this branch please" so I can exclude a leaf or twig.

I've also had problems when symlinks have caused a folder to be listed twice
and so the same content (a huge folder) got uploaded twice and breached my
account limit, oops.

Lastly I'd like a more asynchronous approach to be possible "download all
files but don't delete when other clients do" which helps to create a complete
working backup locally.

Any of this in the pay version ...?

------
callmeed
~/Projects has legacy projects and stuff in SVN

~/Git-Projects has almost all my current projects which are on GitHub

~/htdocs is my local Apache root and it used for testing front-end work or
simple PHP stuff

------
RexRollman
Here's my (user oriented) folder structure on Arch Linux:

    
    
      AUR
      Books
      Desktop
      ISOs
      Music
      Others
      Photos
      Retrieved
      Screenshots
      Wallpapers

------
iworkforthem
Not sure if this is what you are looking for. I am a bit of GTD person.

@defer

@delegate

@review

@todo

@note

Each gigs/proj depend on the stage they are in each of these folders.

------
photon_off
Did you mean C:/Documents and Settings/Administrator ?

------
zyfo
books/ (all longer pdfs/ebooks),

code/ (all code),

docs/ (most docs, mostly notes on various things),

Dropbox/ (all local folders are symlinked here),

<mycompanyname>/ (shared Dropbox folder with everything in),

qqq/ (misc that I wouldn't cry about losing, heavy files),

tmp/ (downloads, random put-some-place for now),

uni/ (everything related to university),

vis/ (visual stuff, ie pictures and images).

