Skip to content

Backend repository of Blaze project that includes REST API and Reverb WebSocket server

License

Notifications You must be signed in to change notification settings

GeekoIsaGeek/blaze-back

Repository files navigation

Blaze

Blaze is yet another swipe app, inspired by Tinder. This repository includes RESTful API and reverb WebSocket server.

Table of Contents

Prerequisites

  • PHP@8.1 and up
  • MYSQL@8 and up
  • _composer@2.5 and up_

Tech Stack

  • Laravel@11 - web application framework
  • Reverb@beta - first-party WebSocket server for Laravel applications.

Getting Started

1. First of all you need to clone Blaze-back repository from github:

git clone https://github.com/GeekoIsaGeek/blaze-back

2. Next step requires you to run composer install in order to install all the dependencies.

composer install

3. Now we need to set our env file. Go to the root of your project and execute this command.

cp .env.example .env

And now you should provide .env file all the necessary environment variables:

MYSQL:

DB_CONNECTION=mysql

DB_HOST=127.0.0.1

DB_PORT=3306

DB_DATABASE=*

DB_USERNAME=*

DB_PASSWORD=*

Reverb:

BROADCAST_DRIVER=reverb

REVERB_APP_ID=*

REVERB_APP_KEY=*

REVERB_APP_SECRET=*

REVERB_HOST=*

REVERB_PORT=*

REVERB_SCHEME=*

after setting up .env file, execute:

php artisan config:cache

in order to cache environment variables.

Now execute in the root of you project following:

  php artisan key:generate

which generates auth key.

If you are using public disk, run:

  php artisan storage:link

to make stored files publicly accessible.

Now, you should be good to go!

Migration

if you've completed getting started section, then migrating database if fairly simple process, just execute:

php artisan migrate

Seeding

it's important to run InterestSeeder to fill interests table with relevant data:

php artisan db:seed --class=InterestSeeder

Development

You can run Laravel's built-in development server by executing:

  php artisan serve

To run a WebSocket server, execute:

  php artisan reverb:start

Project Structure

├─── app
│   ├─── Broadcasting
│   ├─── Console
│   ├─── Enums
│   ├─── Events
│   ├─── Exceptions
│   ├─── Helpers
│   ├─── Http
│   ├─── Models
│   ├─── Providers
│   │... Services
├─── bootstrap
├─── config
├─── database
├─── lang
├─── public
├─── readme
├─── resources
├─── routes
├─── storage
├─── tests
- .env
- artisan
- composer.json
- package.json
- phpunit.xml
- README.md
- vite.config.js

Database Design Diagram

About

Backend repository of Blaze project that includes REST API and Reverb WebSocket server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published