Giter Site home page Giter Site logo

your-songs-laravel's Introduction

! アプリケーション「Your Songs」がPHP/Laravel+Nuxt.jsの構成であったときのPHP/Laravelソースコード

Your Songs

自分のおすすめの曲を紹介できるサービスです。
url: http://your-songs-laravel.site/

Image from Gyazo

使用技術

  • PHP
  • Laravel
  • MySQL
  • SCSS
  • Bootstrap
  • Vue.js
  • Docker
  • docker-compose
  • AWS
    • VPC
    • EC2
    • Route53
    • RDS for MySQL
    • S3
  • CircleCI

本番環境

Image from Gyazo

データベースにはRDS for MySQLを用いています。 画像は全てS3に保存しています。

開発環境

Docker環境での開発になります。 また、開発時にはdocker-composeを使用しています。 開発環境では作業ごとにブランチを切って行っています。

機能一覧

  • 曲機能(songモデル)
  • 曲機能全般
  • ユーザ機能(userモデル)
  • ユーザ登録・ログイン機能全般
  • Githubでのログイン機能
  • 曲検索機能(新着順・お気に入り数順・コメント数順で並び替え可)
  • 曲のレコメンド機能(vue-carousel)
  • ユーザー検索機能
  • ユーザーのレコメンド機能(vue-carousel)
  • タイムライン(フォローしているユーザーの投稿した曲一覧を表示)
  • プロフィール画像の保存機能(S3)
  • コメント機能(commentモデル)
  • 投稿、削除、表示
  • フォロー機能
  • フォロー、アンフォロー機能
  • フォロー中のユーザー&フォロワーの表示
  • お気に入り機能
  • お気に入りした曲の表示
  • 管理者権限機能(曲の削除、完全削除、回復)
  • ページネーション機能

テスト

単体テスト(PHPUnit) (記述を作成・修正中です。)

改善中・実装中の箇所

  • ECS,ECRを設定してCI/CDパイプライン実装
  • ALBを設定し常時SSL化の実現
  • S3からCloudFrontでCDN配信 * SPAの実装
  • テストコードの完成

your-songs-laravel's People

Contributors

kt-321 avatar

your-songs-laravel's Issues

$response->assertRedirect(route("home"));が上手く機能しません。

概要

  • RegisterTestにおいて、「$response->assertRedirect(route("home"));」の記述が誤っているのか、テスト実行時にエラーが発生してしまいます。

  • LoginTestにおいて、「RuntimeException: Session store not set on request.」とエラーが出ます。

エラー詳細

  • RegisterTestのtest_request_should_pass_when_data_is_providedにおいて、
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://localhost/home'
+'http://localhost'

と表示されます。
これは、userのidが渡されていないために起こっているエラーでしょうか?
またその場合、ユーザー登録直後の記述において、どのような記述でuserのidを渡すことができるのでしょうか?

  • LoginTestのtest_valid_user_can_loginでは、$this->withoutExceptionHandling();でエラー内容を調べると
// ログイン実行
        $response = $this->post(route("login.post"), [
            "email" => $user->email,
            "password" => "test1111"
        ]);

のパスワードの行に関して、

RuntimeException: Session store not set on request.

と表示されました。
「web」ミドルウェアをrouteに設定したのですが、エラーは解消されませんでした。

こちらは、そもそもテストの記述の仕方自体に問題があるのか、それともミドルウェアの記述やLaravelのバージョン等別の箇所に問題があるのか、いずれの可能性が高いかアドバイスいただけますでしょうか?

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.