Document System for the Meetings in Kumano-Dormitory
built with hanami
Before setup, install Docker, add user to Docker group.
$ ./config/database_up.sh
$ bundle install --path vendor/bin
$ bundle exec hanami db prepare
$ bundle exec hanami server
$ bundle exec rake seed
And then, open http://localhost:2300.
web:
- Main web page for general users.
- Users are able to view articles, post new articles, and edit the articles.
- Users are able to search articles and download PDF.
admin:
- Admin web page for admin users.
- Admin users are able to create new meeting and edit all meetings.
- Admin users are able to view all articles, create new articles, edit all articles, and change status of articles (order, printed?, checked?, etc...).
- Admin users are able to change order of articles and then download PDF.
api:
- API for smartphone application.
- API returns json data of meetings, articles, comments, etc...
- API generates JWT for accessing API.
attribute |
type |
|
id |
Primary key |
|
title |
String |
|
body |
String |
|
number |
Integer |
|
format |
Integer |
0:text, 1:markdown |
checked |
Boolean |
|
printed |
Boolean |
|
author_id |
Foreign key |
on delete cascade |
meeting_id |
Foreign key |
on delete cascade |
attribute |
type |
|
id |
Primary key |
|
date |
Date |
|
deadline |
DateTime |
|
type |
Integer |
0:default(BlockMeeting), 1: GeneralMeeting |
attribute |
type |
id |
Primary key |
name |
String |
crypt_password |
String |
lock_key |
String |
attribute |
type |
|
id |
Primary key |
|
name |
String |
|
require_content |
Boolean |
true: requires VoteContent, false: not requires |
attribute |
type |
|
id |
Primary key |
|
extra_content |
String |
for VoteContent |
article_id |
Foreign key |
on delete cascade |
category_id |
Foreign key |
on delete cascade |
Comment
attribute |
type |
|
id |
Primary key |
|
body |
String |
|
crypt_password |
String |
|
article_id |
Foreign key |
on delete cascade |
block_id |
Foreign key |
on delete cascade |
attribute |
type |
id |
Primary key |
name |
String |
attribute |
type |
|
id |
Primary key |
|
caption |
String |
|
csv |
String |
|
article_id |
Foreign key |
on delete cascade |
attribute |
type |
|
id |
Primary key |
|
agree |
Integer |
|
disagree |
Integer |
|
onhold |
Integer |
|
crypt_password |
String |
|
article_id |
Foreign key |
on delete cascade |
block_id |
Foreign key |
on delete cascade |
attribute |
type |
|
id |
Primary key |
|
body |
String |
|
send_by_article_author |
Boolean |
|
comment_id |
Foreign key |
on delete cascade |
author_id |
Foreign key |
on delete cascade |
attribute |
type |
|
article_old_id |
Primary & Foreign key |
on delete cascade |
article_new_id |
Primary & Foreign key |
on delete cascade |
same |
Boolean |
|
attribute |
type |
|
id |
Primary key |
|
title |
String |
|
type |
Integer |
0: markdown (default), 1: PDF, 2: URL |
body |
String |
markdown or filename or URL |
user_id |
Foreign key |
on delete cascade |
attribute |
type |
|
id |
Primary key |
|
body |
String |
|
description |
String |
|
Rubocop is ready to use!
Test is written in RSpec. To run test:
$ HANAMI_ENV=test bundle exec hanami db prepare
$ bundle exec rake test