A minimum viable product for filling out IAAs.
Very much in alpha. To track work in progress, visit our public Trello board: https://trello.com/b/1DeHImIq/iaa-forms
Stand up site on Cloud FoundryCRUD for Form 7600A
- CRUD for Form 7600B
- Stretch goal: generate the actual PDF (move to milestone 2 if not accomplished)
- Integrate with client-facing forms
It's just Meteor.
To run locally, have the GitHub API set up, and run:
meteor run --settings config/settingsDev.json
This applicatioh uses the accounts-ui
and accounts-github
Meteor packages to handle logins (meaning you log in with your GitHub account).
To run this app locally, copy config/settingsDev.json.sample
(rename to settingsDev.json
) and add the appropriate API keys.
See devops for Cloud Foundry help/setup if you don't have an account (18F staff only).
Clone the repo, and run cf push
to intialize your application. The deploy will likely fail, but that is ok.
Create a GitHub application and set the following environment variables:
cf set-env iaa-mvp GITHUB_CLIENT_ID thegithubclientid
cf set-env iaa-mvp GITHUB_SECRET thegithubsecret
Ensure you have access to MongoDB by running cf marketplace
. If you don't, contact #devops in Slack. The output should look like:
service plans description
elasticsearch free Elasticsearch search service
elasticsearch-new free Elasticsearch 1.5 service for application development and testing
mongodb-new free MongoDB service for application development and testing
postgresql default PostgreSQL database
rds shared-psql, micro-psql*, medium-psql* RDS Database Broker
Here, we're using the mongodb-new
service. To see the plans, run cf marketplace -s mongodb-new
, which returns:
service plan description free or paid
free medium free
There's only one plan, free
, which is what we'll use here. Create the service:
cf create-service mongodb-new free iaa-mongo
Then bind the service:
cf bind-service iaa-mvp iaa-mongo
Finally, restage:
cf restage iaa-mvp
cf push
This is all subject to change fairly rapidly, but this is the current state of codebase organization:
client
: contains static assets such as CSS files and images.config
: contains configuration androutes.js
.routes.js
uses the Iron Router to define routes along with some lightweight controllers.lib
: contains utility code that could be used anywhere else in the codebase. Ideally it should be completely application-agnostic. For example, right now it has onlyus_states.js
, a Javascript object that has a list of US states and their two-letter abbreviations. This is used to populate select boxes in our forms.models
: contains our models. Model files should include the Mongo Collection definition, CRUD operations, Meteor publishing code, andallow
/deny
logic.views
: contains HTML templates and client-side UI logic. Subfolders such as 'form7600a' andindex
will contain a main HTML template along withevents.js
,helpers.js
, andrendered.js
files.events.js
is home to code that responds to events such as form submissions.helpers.js
makes functions available inside of HTML templates.rendered.js
is home to code that executes once the template is rendered. This would be a good place to store custom JQuery that would normally wait for$(document).ready()
. Other HTML files in theviews
folder are somewhat more miscellaneous, such as the layout template, the 404 page, and a helper for selecting US states in an HTML select tag.
When in doubt, read the Meteor docs.