This is the code for running a website for a wedding. The primary purpose for this software is to let people see where all of our receptions are. Then they can choose to RSVP to any they are able to attend.
You will need Leiningen 2.0.0 or above installed.
See project.clj
for more information about the project's requirements.
This site persists data in a PostgreSQL database.
To set up the database on your development environment,
first create the wedding
database:
$ createdb wedding
Then you need to run the migrations.
wedding-site.core> (migration/migrate)
To start a web server for the application, run:
lein ring server
You can also run the web server from within a REPL:
user=> (use 'wedding-site.core :reload)
user=> (def server (run {:join? false}))
And you can stop it and restart it:
user=> (.stop server)
user=> (def server (run {:join? false}))
(Thanks to Dave Ray for explaining how to do that on his blog.)
This project uses ideas from both SMACSS and BEM. From SMACSS I've taken the idea of categories of styles. So far I'm using the "Base" and "Module" categories. I've taken the rest of the ideas from BEM. In particular I've chosen to adopt their naming conventions.
This project follow's Angular's commit message format. Refer to the linked document for the full details. But here's a quick reference:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The type must be one of the following:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code code change that neither fixes a bug or adds a feature
- perf: A code change that improves performance
- test: Adding missing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
This project uses a text file in GNU Recutils format to track issues. These include both enhancements and defects. This way we get a bug database that (a) is easy to manage in a text editor, (b) lives in the repository, and (c) can still be flexibly queried.
Here are a few useful queries. Note that you have to have recutils installed.
$ # Show all open enhancements.
$ recsel -e "Type = 'Enhancement' && Status != 'Closed'" issues.rec
$ # Show all open defects.
$ recsel -e "Type = 'Enhancement' && Status != 'Closed'" issues.rec
$ # Count the number of open issues by type.
$ recsel -e "Status != 'Closed'" -p "Type,Count(ID):Count" -G "Type" issues.rec
$ # Verify there are no syntactic or formatting problems.
$ recfix --check issues.rec
Copyright © 2016 Tom Small III.
Distributed under the Eclipse Public License, the same as Clojure.