OMA
is an online TODO-list powered by Rails. It has been designed for multi-user editing same TODO list
via git:
git clone https://github.com/TimWei/OMA.git
mirrors:
Since default user-authentication using Google Oauth2. you should followed steps in Google OAuth 2.0 for Client-side Web Applications for getting Google Oauth Client ID. and put it in oma_frontend/_data/app.yml
like below:
oauth:
#replace GOOGLE_OAUTH_ID to your google oauth id
google: 'GOOGLE_OAUTH_ID'
We will use built-in development server, and SQLite3 as database for quick start. you could changing to your favorite Rails stacks depend on needed.
cd oma_backend
bundle install
rake db:migrate
rails s -b 0.0.0.0
The frontend bundler using Jekyll as default. before building you should configure application's backend settings by modified app.yml
.
p.s. Rails built-in server will run on 3000 port by default
vim oma_frontend/_data/app.yml
network:
# backend api setting, replace RAILS_BACKEND_HOST and RAILS_BACKEND_PORT to your real backend server
host: 'RAILS_BACKEND_HOST'
port: 'RAILS_BACKEND_PORT'
#default api path
api_prefix: '/api/v1'
cable: '/cable'
oauth:
#replace GOOGLE_OAUTH_ID to your google oauth id
google: 'GOOGLE_OAUTH_ID'
After backend configuration was done. easily build application by
cd oma_frontend
bundle install
jekyll build
and application with assets will generating atoma_frontend/_site
If you dont have web server for hosting statics, There is also built-in web server in Jekyll by:jekyll serve
If all these steps finished in right way. OMA is ready for use!
As we using built-in server for quick start, you might want to setup production configuration for both performance and security.here are some suggestion you could following:
You may want to change Database from SQLite to MySQL in production for performance. by following How To Use MySQL with Your Ruby on Rails Application
If you run Rails in Production mode without setup production secrets. the error will raised. make sure you've set SECRET_KEY_BASE
in environment variables.
I recommended Nginx + Passenger for Rails productions. Introduction to configuring Passenger + Nginx
You could integrating favorite social network sign-in in user authentication module. or replace front-end bundler from Jekyll to Webpack depend on your needed. changing every module in project is possible:
OMA is licensed under the MIT license