Skip to content

tomhash/fresh-deli

Repository files navigation

アプリーション名

Fresh Delivery

アプリケーション概要

農家と個人をCtoCでつなぎ、野菜を出品でき購入できる。また農家の方とお客様、農家の方同士のコミュニケーションがとれる。

Basic認証 ID/pass

  • ID : tomonari
  • Pass : 1125

テスト用アカウント等

購入者用

購入者用クレジットカード情報

  • 番号 : 4242424242424242
  • 期限 : 3/25
  • セキュリティーコード : 123

出品者用

概要

まず、ユーザー登録をしてもらいログインした状態で農作物の出品や購入、チャットなどを利用できる。ログインなしでも商品閲覧は可能。

目指した課題解決

これまで農業を長くやってきて自分のような小中規模農家の利益の少なさ、お客様の生の声を聞く機会の少なさなどを感じてきました。
この2点を軸に解決できたらと思い農家と個人をCtoCでつなぐサービスを作りました。さらに、農業者同士のコミュニケーションのため、また、これから農業をやってみようと思っている方々のためにチャットスペースを設けの農業の未来と担い手の減少という問題を解決したい

洗い出した要件

  • ユーザー管理機能
  • 商品出品機能
  • 商品一覧表示機能
  • 商品詳細機能
  • 商品編集機能
  • 商品削除機能
  • マイページの表示
  • ユーザー情報変更機能
  • コメント機能
  • チャット機能
  • 商品検索機能
  • 商品購入機能

実装した機能

1.ユーザー管理機能

新規登録ボタンをクリックすると登録画面に遷移し登録情報がデータベースに保存される。登録されるとログインボタンよりログイン、ログアウトボタンよりログアウトができる。

Image from Gyazo Image from Gyazo 2.商品出品機能

出品ボタンをクリックすると商品出品画面に遷移し各項目を入力できていると出品が完了しデータベースにデータが保存されトップページに戻る

Image from Gyazo

3.商品一覧表示機能

出品されている商品が複数ある場合トップページに一覧で表示が可能

Image from Gyazo 4.商品詳細機能

出品商品画像をクリックすると商品の詳細が見れログイン中ユーザーと出品者が同一人物だと編集ボタンと削除ボタンが表示され、別ユーザーだと商品購入ボタンが表示される

Image from Gyazo 5.商品編集機能

出品商品の詳細画面に出品者とログインユーザーが同一であった場合に表示される編集ボタンをクリックすると編集画面に遷移し出品商品情報を編集できる

6.商品削除機能

出品商品の詳細画面に出品者とログインユーザーが同一であった場合に表示される削除ボタンをクリックするとデータをデータベースから削除でき詳細ページが消えトップページに戻る。

7.マイページの表示

ログインユーザーのnameをクリックするとマイページに遷移し仮に出品商品が複数ある場合はマイページにまとめて表示される。出品が無い場合はユーザー情報の変更の際使用。

Image from Gyazo 8.ユーザー情報変更機能

ログイン時にログインユーザーのnameをクリックしマイページに遷移し登録情報編集のボタンをクリックすると登録情報編集ページに遷移し、名前・メールアドレスの編集、インスタ・フェイスブックアカウントの変更・登録ができる。

Image from Gyazo 9.コメント機能

商品詳細画面下部にあるコメント欄より生産者とやりとりができる。購入前に商品について、また生産者様への購入後の感謝の言葉、感想などを伝えることができる。コメントは商品を削除しない限り残る。

Image from Gyazo 10.チャット機能

野菜を販売するアプリなので出品者として多くの農家の方が集まる。そこで生産者同士で農業について、農家だから分かる悩みの相談、また農業をこれからはじめようとしている方は農業者に直接アドバイスをいただける場として活用できる。ログインしている方であればどなたでも利用可。していない場合はログインページに遷移する。

Image from Gyazo 11.商品購入機能

商品が出品されていて購入ボタンをクリックするとpayjpの履歴に購入金額の値が表示される

Image from Gyazo Image from Gyazo

実装予定の機能

  • 商品検索機能

テーブル設計

users テーブル

Column Type Options
nickname string null: false
email string null: false
password string null: false
family_name string null: false
first_name string null: false
family_name_kana string null: false
first_name_kana string null: false
birthday date null: false
facebook_url string -----------
instagram_url string -----------

Association

  • has_many :items
  • has_many :buyers

items テーブル

Column Type Options
item_url string null: false
name string null: false
description string null: false
category integer null: false
item_condition integer null: false
ship_from integer null: false
shipping_type integer null: false
preparation_day integer null: false
price integer null: false
user references null: false ,foreign_key: true

Association

  • belongs_to :user
  • has_one :buyer
  • has_many :comments

buyers テーブル

Column Type Options
user references null: false ,foreign_key: true
item references null: false ,foreign_key: true
  • belongs_to :user
  • belongs_to :item
  • has_one :destination

destinations テーブル

Column Type Options
postal_code integer null: false
ship_from integer null: false
city string null: false
address string null: false
building string ------------------------------
phone_number string null: false
buyer references null: false ,foreign_key: true

Association

  • belongs_to :buyer

messages テーブル

Column Type Options
text string null: false

comments テーブル

Column Type Options
user references null: false ,foreign_key: true
item references null: false ,foreign_key: true
text string null: false

ER図

fresh-deli

ローカルでの動作方法

  • ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
  • Homebrew 2.4.16

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors