Giter Site home page Giter Site logo

kkouta / oss-calendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thinkingreed-inc/oss-calendar

0.0 0.0 0.0 830 KB

OSS Calendarは企業で使うことを想定したオープンソースのカレンダーアプリです。

Home Page: https://oss-calendar.com/

Shell 0.17% PHP 51.60% Vue 47.62% Blade 0.26% Dockerfile 0.34% Stylus 0.02%

oss-calendar's Introduction

OSS Calendar

OSS Calendar Logo
OSS Calendarは企業で使うことを想定したオープンソースのカレンダーアプリです。

Motivation

企業内のスケジューラーは使いづらい部分が多くあります。
しかし、個人のGoogleカレンダーなどと連携させてしまうと情報管理が心配で、開発をしたくてもカレンダーアプリは費用が掛かりすぎてしまいます。

OSS Calendarは企業で使うことを想定したカレンダーアプリですので、以下のような機能を実現しています。

  • チーム全員のスケジュールの可視化
  • 素早いメンバーアサインの実現
  • 通常のスケジューラーとしての利用

詳しくは公式サイトをご確認ください。
OSS Calendar

Features

  • Laravel 5.8
  • passport
  • Vue + VueRouter + Vuex
  • vuetify

開発環境

Dockerを使って開発サーバーを建てる手順について説明します。 検証はMacOSのDocker for Macで行っていますので、Windowsの場合ところどころ違う可能性があります。

バックエンドの準備

git clone https://github.com/thinkingreed-inc/oss-calendar.git oss-calendar
cd oss-calendar
docker-compose build
docker-compose up -d

コンフィグを準備する

cp .env.example .env
  • クライアントサーバとAPIサーバの.envファイルの設定例:
APP_URL=http://localhost #APIServerのURLを指定
CLIENT_URL=http://localhost #クライアントのURLを指定、HTMLを配信する場所
###
# CLIENT_URLは、npm run devで立ち上げた場合、http://localhost:3000になるため注意する
###

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=osscalendar
DB_USERNAME=username
DB_PASSWORD=userpass

MAIL_DRIVER=smtp
MAIL_HOST=mailcatcher
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="シンキングリード"

Laravelのセットアップ

# Dockerコンテナにログインして、Composerで関連ファイルをInstallする
docker ps
docker exec -it [container_id] bash
# ここからコンテナ内
cd /var/www/html/
composer install
php artisan key:generate
php artisan optimize
php artisan migrate
php artisan db:seed
php artisan passport:install

注意点

  • 既存のdockerimageとのポートの競合を回避する必要あります。
    もし80番ポート等を使われている場合は、docker-compose.yml内のポートを修正してください。 クライアントサーバはnpm run devで稼働し、APIサーバはDockerコンテナのNginx、php-fpmで稼働します
  • .env.sampleをコピーして.envファイルを作成する
  • .envファイルにあるAPP_KEYを更新する
  • .env内部では半角スペースを使用できません。利用する場合はシングルクォーテーションでくくってください。
  • もし、開発時にLaravelのコードが反映されない場合、php artisan optimizeでキャッシュをクリアする

フロントエンドの準備

ここではDockerではなく、クライアント側でnpmを実行手順を紹介する 先にも書きましたが、CLIENT_URLの部分は http://localhost:3000 を指定してください。

  • クライアントのコマンド実行例:
npm install
npm install -g nuxt
npm run dev
※クライアントサーバのポートは.envに記載してあるポート番号を自動で読み込む

表示されるURLにアクセスして、ログイン画面が表示され、「admin/admin」でログインできれば環境構築は完了です。

補足

APIサーバには設定ファイルがキャッシュ化されているため、設定変更した場合は、php artisan optimizeコマンドを実行する。

本番環境(加筆中)

クライアントサーバとAPIサーバを同一サーバにとして稼働させる
※同一サーバにすることでサーバのメンテナンスコストを削減できる

  • envの設定例:
CLIENT_URL=http://localhost
APP_URL=http://localhost
※CLIENT_URLとAPP_URLは同じにする
  • 静的ファイルの書き出し:
$ npm run generate
$ npm run build
※public/_nuxtフォルダに書き出される
※.envのAPP_URLとCLIENT_URLによって、.htaccessのRewriteBaseは自動設定される
  • 同一サーバで稼働させる
    apacheのドキュメントルートをpublic/以下に設定し、稼働させる
    APIサーバには設定ファイルがキャッシュ化されているため、設定変更した場合は、php artisan optimizeコマンドを実行する。

Cronの設定

予定のメール通知を受け取るために、以下のスクリプトをcronに登録する

$ crontab -e
#以下の行を追加
#cd /var/www/html/ && php artisan command:reminder >> /dev/null 2>&1

開発

api用のコントローラの作成

$ php artisan make:controller ApiController --api

自動補完対応

$ php artisan ide-helper:generate
$ php artisan ide-helper:model

License

GPLv3 Disclaimer

For the avoidance of doubt, except that if any license choice other than GPL or LGPL is available it will apply instead, Thinkingreed elects to use only the General Public License version 3 (GPLv3) at this time for any software where a choice of GPL license versions is made available with the language indicating that GPLv3 or any later version may be used, or where a choice of which version of the GPL is applied is otherwise unspecified.

OSS-Calendar FOSS License Exception

We want free and open source software applications under certain licenses to be able to use specified GPL-licensed OSS-Calenar despite the fact that not all such FOSS licenses are compatible with version 3 of the GNU General Public License. Therefore there are special exceptions to the terms and conditions of the GPLv2 as applied to these client libraries, which are identified and described in more detail in the FOSS License Exception at There are other conditions specified by Thinkingreed.

oss-calendar's People

Contributors

remicck avatar junmt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.