Skip to content

Commit fa45732

Browse files
authored
[docs] Move to dedicated documentation site (#155)
* npx docusaurus-init * Add .gitignore * Move docker-compose.yml inside website * Run on port 4000 * Add .prettierrc * Edit naming config * Add doc files * More content * Update config * Remove blog posts * Reword * Add favicon * Add API Usage * Add travis integration * Add api usage link to footer * Reference website from readme * Improve link contrast with body text * Content updates * Improve homepage features * Switch to master as default
1 parent 61b9f83 commit fa45732

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1612
-23
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*.log

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": true,
4+
"singleQuote": true
5+
}

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: ruby
2-
cache: bundler
2+
cache:
3+
bundler: true
4+
yarn: true
35
sudo: false
46
bundler_args: --path vendor --local --without development
57
env:
@@ -15,3 +17,8 @@ script:
1517
addons:
1618
code_climate:
1719
repo_token: 702251f0d6eb1f569078a27c4ae3366b1e48c4c6d7e4dd3ae0ca3583fd2bc8db
20+
deploy:
21+
provider: script
22+
script: bash website/travis-deploy.sh
23+
on:
24+
branch: master

Dockerfile-website

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:8.11.4
2+
3+
WORKDIR /app/website
4+
5+
EXPOSE 4000 35729
6+
COPY ./docs /app/docs
7+
COPY ./website /app/website
8+
RUN yarn install
9+
10+
CMD ["yarn", "start"]

README.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
An all-in-one platform for managing hackathon registration & logistics, originally developed for [BrickHack](https://github.com/codeRIT/brickhack.io).
99

10+
Read more at **[coderit.org/hackathon-manager/](https://coderit.org/hackathon-manager/)**
11+
1012
- **Hacker applications:** Enable hackers to apply to your hackathon while providing all relevant information (contact info, school, demographics, etc)
1113
- **MyMLH support:** Streamline the application process when users log in with [MyMLH](https://my.mlh.io/), a common platform for applying to any MLH hackathon. Basic info is pre-filled based on a common application, so hackers don't have to re-type it every time.
1214
- **Admissions & RSVPs**: Facilitate accepting hackers to your hackathon & enable them to RSVP
@@ -35,34 +37,16 @@ HackathonManager makes use of a few different third-party services & Ruby gems:
3537
- [Blazer](https://github.com/ankane/blazer) (custom SQL queries, analytics, and charts)
3638
- [Doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) (authentication via OAuth for API usage)
3739

38-
See [Deployment](#Deployment) for instructions to deploy.
39-
40-
### Customization
41-
42-
Be sure to review all of these before going live!
43-
44-
- **Content**: Various settings are available at http://your-site/manage/configs
45-
- **Emails**: Default automated emails are loaded into http://your-site/manage/messages
46-
- **Styling**: Custom styling is not yet supported, but should be available starting Summer 2019.
47-
48-
## Deployment
40+
## Get Started
4941

50-
HackathonManager supports two platforms out of the box:
51-
52-
- [Heroku](https://www.heroku.com) — Easiest & quickest way that requires little server knowledge, however isn't cheap (free tier not recommended)
53-
- [Dokku](http://dokku.viewdocs.io/dokku/) — A free alternative to Heroku, runs on your own virtual machine
54-
- [OKD/OpenShift](https://www.okd.io) — "Enterprise Kubernetes for Developers" packaged with a useful management UI + tooling
55-
56-
See the platform-specific guides [on the Wiki](https://github.com/codeRIT/hackathon_manager/wiki) to get started!
57-
58-
HackathonManager can also be deployed the same as any other Rails app, however this is **not** natively supported and will require you to fork this repo to integrate code changes.
59-
60-
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
42+
**[Deploy HackathonManager for your hackathon »](https://coderit.org/hackathon-manager/docs/deployment)**
6143

6244
## Contributing
6345

6446
GitHub issues and pull requests welcome!
6547

48+
If there's a new feature you're looking to implement, **please** file an issue to open discussion on the feature before starting work or opening a pull request.
49+
6650
## Development
6751

6852
Pre-requisite: Have a functioning, local Ruby + MySQL development environment. [See this guide for pointers.](https://gorails.com/setup)

docs/api.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
id: api
3+
title: API Usage
4+
---
5+
6+
Almost all of the functionality exposed to users can also be accessed as an API with OAuth credentials. This includes both public- and management-facing functionality.
7+
8+
**Please note:** HackathonManager's primary audience is the web interface.
9+
10+
While functionality may co-exist for both browser and API usage, API-style support might be a little rough around some edges. If you stumble upon something that works a little different than usual (e.g. returns HTML instead of JSON), open an issue and we can figure it out.
11+
12+
## Endpoints
13+
14+
Endpoints are shared with regular page controllers for browser-style functionality. This leverages Ruby on Rails routing (for a deep dive, see [Rails Routing from the Outside In](https://guides.rubyonrails.org/routing.html)).
15+
16+
For example, listing bus lists:
17+
18+
- User-facing page: https://apply.brickhack.io/manage/bus_lists
19+
- API endpoint: https://apply.brickhack.io/manage/bus_lists.json
20+
21+
Because Rails follows a standard CRUD-format, these endpoints become very REST-like.
22+
23+
For example:
24+
25+
- List all tags: `GET https://apply.brickhack.io/manage/trackable_tags.json`
26+
- View specific tag: `GET https://apply.brickhack.io/manage/trackable_tags/1.json`
27+
- Create tag: `POST https://apply.brickhack.io/manage/trackable_tags.json` (with a JSON body of parameters)
28+
- Update tag: `PATCH https://apply.brickhack.io/manage/trackable_tags/1.json` (with a JSON body of parameters)
29+
- Delete tag: `DELETE https://apply.brickhack.io/manage/trackable_tags/1.json`
30+
31+
For a full list of endpoints, run `bin/rails routes` locally. This utility, provided by Ruby on Rails, lists all possible paths you can route too (along with their respective HTTP method).
32+
33+
**Note: datatable endpoints** are highly coupled to [Datatables](https://datatables.net) functionality and are not easy to use.
34+
35+
Example for questionnaire management endpoints:
36+
37+
```
38+
...
39+
Prefix Verb URI Pattern Controller#Action
40+
datatable_manage_questionnaires POST /manage/questionnaires/datatable(.:format) manage/questionnaires#datatable
41+
check_in_manage_questionnaire PATCH /manage/questionnaires/:id/check_in(.:format) manage/questionnaires#check_in
42+
convert_to_admin_manage_questionnaire PATCH /manage/questionnaires/:id/convert_to_admin(.:format) manage/questionnaires#convert_to_admin
43+
update_acc_status_manage_questionnaire PATCH /manage/questionnaires/:id/update_acc_status(.:format) manage/questionnaires#update_acc_status
44+
bulk_apply_manage_questionnaires PATCH /manage/questionnaires/bulk_apply(.:format) manage/questionnaires#bulk_apply
45+
message_events_manage_questionnaire GET /manage/questionnaires/:id/message_events(.:format) manage/questionnaires#message_events
46+
manage_questionnaires GET /manage/questionnaires(.:format) manage/questionnaires#index
47+
POST /manage/questionnaires(.:format) manage/questionnaires#create
48+
new_manage_questionnaire GET /manage/questionnaires/new(.:format) manage/questionnaires#new
49+
edit_manage_questionnaire GET /manage/questionnaires/:id/edit(.:format) manage/questionnaires#edit
50+
manage_questionnaire GET /manage/questionnaires/:id(.:format) manage/questionnaires#show
51+
PATCH /manage/questionnaires/:id(.:format) manage/questionnaires#update
52+
PUT /manage/questionnaires/:id(.:format) manage/questionnaires#update
53+
DELETE /manage/questionnaires/:id(.:format) manage/questionnaires#destroy
54+
datatable_manage_checkins POST /manage/checkins/datatable(.:format)
55+
...
56+
```
57+
58+
## Request & response
59+
60+
Most endpoints can operate with JSON requests & responses. Simply provide `.json` at the end of the URL to be returned JSON, and provide `Content-Type: application/json` when using POST or PATCH with a JSON body.
61+
62+
Note that while most endpoints support JSON responses, some do not have this support. Redirect responses are common for some actions, for which you'll receive a 302 redirect response and no JSON body.
63+
64+
The best way to see what's expected is to look at the controller source code, located at [`app/controllers/`](https://github.com/codeRIT/hackathon_manager/tree/master/app/controllers). Here, you'll see how each endpoint is configured; this maps to the routes listed by `bin/rails routes`. For example:
65+
66+
```ruby
67+
def show
68+
respond_with(:manage, @questionnaire)
69+
end
70+
```
71+
72+
- This "show" endpoint is the natural mapping for something like `GET /manage/questionnaires/1.json`
73+
- Because `respond_with` is used, it will return JSON when `.json` is used in the URL
74+
75+
# Authentication
76+
77+
Authentication is implemented with OAauth 2, provided by the [Doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) gem.
78+
79+
An OAuth app should be created by an admin at https://apply.your-hackathon.com/oauth/applications. From there, you can implement a standard OAuth 2 flow.
80+
81+
For Doorkeeper endpoints + docs, see https://github.com/doorkeeper-gem/doorkeeper/wiki/API-endpoint-descriptions-and-examples
82+
83+
Once appropriate authentication credentials are retrieved, they should be provided on all API requests.
84+
85+
### Security note
86+
87+
For a mobile- or front-end app, or any app that has API calls running on the client, you should **not** use an authorization flow involving the application secret; otherwise, you would be distributing the secret to the public, compromising the whitelist nature of controlling which apps may pose as your users.
88+
89+
For most use cases, the **authorization code grant** or **implicit grant** flows should be used. Check out [this guide by Auth0](https://auth0.com/docs/api-auth/which-oauth-flow-to-use) for more info.

docs/assets/bus-sign-up.png

202 KB
Loading

docs/assets/promote-bus-captain.png

171 KB
Loading

docs/assets/questionnaire.png

1.27 MB
Loading

docs/busses.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
id: busses
3+
title: Busses
4+
sidebar_label: Busses
5+
---
6+
7+
HackathonManager enables you to facilitate bus sign-ups for attendees during the RSVP process.
8+
9+
## Attendee sign-ups
10+
11+
**Attendees can sign up for any available bus list.** This is presented to them during the RSVP process.
12+
13+
By signing up, they reserve one spot on the bus. If a bus fills up, no more attendees will be able to sign up for that bus.
14+
15+
![Screenshot from attendee perspective for signing up for a bus](assets/bus-sign-up.png)
16+
17+
## Bus Captains
18+
19+
Passengers can volunteer to be a captain when signing up for a bus.
20+
21+
Bus captains:
22+
23+
- Have their name, email, and phone number shared with bus passengers
24+
- Can see the full passenger list for their bus
25+
- Can mark passengers as boarded during boarding (mobile-friendly)
26+
27+
### Promoting a passenger to captain status
28+
29+
Any passenger can be promoted to a captain, even if they didn't volunteer (e.g, you've reached out to them directly).
30+
31+
You'll see the option to promote a passenger to being a bus captain, as well as a separate section specifically for people that have volunteered to be captains.
32+
33+
**Upon making someone a captain:**
34+
35+
- Their name, email, and phone number will be visible to passengers
36+
- The new captain will receive an email notification ([this is the default template](https://github.com/codeRIT/hackathon_manager/blob/master/app/views/mailer/bus_captain_confirmation_email.html.erb))
37+
38+
![Screenshot of list of users with link to promote to bus captain status](assets/promote-bus-captain.png)
39+
40+
### Boarding flow for bus captains
41+
42+
The day of your hackathon, bus captains will need to know who is allowed on the bus, and mark those that have boarded.
43+
44+
Bus captains should open https://your-hackathon.com/bus_list and sign in. From there, they can view the entire list of passengers.
45+
46+
Tapping/clicking on the checkbox next to each name will mark that passenger as boarded/not boarded.
47+
48+
Example email to a bus captain:
49+
50+
```
51+
Hey [name],
52+
53+
Thanks again for volunteering to be a bus captain! [HackFoo]'s bus to [location] would not be possible without your help, and we greatly appreciate it.
54+
55+
As a bus captain, you are in charge of who does and does not board the bus. It's incredibly important that **only people who are on the registered passenger list may board.** Not only could an extra person take someone else's seat, but they may not have been accepted to the hackathon and/or have not signed proper liability waivers.
56+
57+
To help with this, open https://your-hackathon.com/bus_list on your phone. From there, your bus's full passenger list is shown.
58+
59+
As people board, **tap on the checkbox next to their name** (including yourself). This will mark them as boarded, and will update your "boarded" count for an easy head-count. Once everyone has boarded, do a quick head-count on the bus to make sure these numbers match up.
60+
61+
If you have any questions day-of, don't hesitate to call or text me at [your cell phone number].
62+
63+
Hope to see you soon!
64+
65+
- [your name]
66+
[your email]
67+
[your cell phone number]
68+
```

docs/customization.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
id: customization
3+
title: Customization
4+
---
5+
6+
Be sure to review all of these before going live!
7+
8+
## Content
9+
10+
Various settings are available at http://your-site/manage/configs
11+
12+
## Emails
13+
14+
Default automated emails are loaded into http://your-site/manage/messages
15+
16+
## Styling
17+
18+
Custom styling is not yet supported, but should be available starting Summer 2019.

0 commit comments

Comments
 (0)