Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion backend/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
# BSA 2019 Thread backend
# BSA 2019 Thread (backend)

## Technologies

* PHP 7.2 || 7.3
* [Laravel 5.8](https://laravel.com)
* [Docker](https://www.docker.com/)
* [Docker-compose](https://docs.docker.com/compose/)
* [Beanstalkd](https://github.com/beanstalkd/beanstalkd) - message queue (очередь сообщений для обработки тяжелых задач асинхронно)
* [REST API](https://ru.wikipedia.org/wiki/REST)
* [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/CORS)
* [JWT](https://ru.wikipedia.org/wiki/JSON_Web_Token) tokens
* Websockets and [Pusher](https://pusher.com/) service
* MySQL 5.7

## Install

Set your .env vars:
```bash
cp .env.example .env
```

### Launch local environment:

Step inside project directory
```bash
cd <project_dir>/backend
```

Start application docker containers:
``` bash
docker-compose up -d
```

Install composer dependencies and generate app key:
```bash
docker exec -it thread-app composer install
docker exec -it thread-app php artisan key:generate
```

Database migrations install (set proper .env vars)
```bash
docker exec -it thread-app php artisan migrate
docker exec -it thread-app php artisan db:seed
```

Generate jwt key and create link to public folder for file uploads (you should have `FILESYSTEM_DRIVER=public` in .env):
```bash
docker exec -it thread-app php artisan jwt:generate
docker exec -it thread-app php artisan storage:link
```

Application server should be ready on http://localhost:<APP_PORT>

Pusher websocket server install:
* Create an account and application on [pusher.com](https://pusher.com/) and copy your credentials to your .env (`PUSHER_APP_ID=...`).
* Update your .env (`QUEUE_CONNECTION=beanstalkd`, `BROADCAST_DRIVER=pusher`) and launch beanstalkd queue listening to messages by `docker exec -it thread-app php artisan queue:work`

Emails processing .env settings (you can use [mailtrap](https://mailtrap.io/) or your smtp credentials like user@gmail.com):
```dotenv
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_USERNAME=<mailtrap_key>
MAIL_PASSWORD=<mailtrap_password>
MAIL_PORT=587
MAIL_FROM_ADDRESS=admin@thread.com
MAIL_FROM_NAME="BSA Thread Admin"
```

You can debug your app with [Telescope](https://laravel.com/docs/5.8/telescope) tool which is installed already :)
13 changes: 11 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# BSA 2019 Thread project (frontend)

## Technologies

* [Vue.js](https://vuejs.org/) framework
* [vue-cli](https://cli.vuejs.org/)
* [vue-router](https://router.vuejs.org/)
* [vuex](https://vuex.vuejs.org/)
* [Buefy](https://buefy.org/) UI framework
* [pusher-js](https://github.com/pusher/pusher-js)

## Getting started

Install the following packages prior to standing up your development environment:
Expand All @@ -13,14 +22,14 @@ cp .env.example .env.local
yarn install
```

Configure your .env.local
Configure your `.env.local`:
```
VUE_APP_API_URL=http://<host>:<port>/api/v1
VUE_APP_PUSHER_APP_KEY=<pusher-app-key>
VUE_APP_PUSHER_APP_CLUSTER=<pusher-app-cluster>
VUE_APP_PUSHER_APP_AUTH_ENDPOINT=http://<host>:<port>/broadcasting/auth
```

Replace `<host>` and `<port>` according to your backend url. You should register and create application on [Pusher](https://pusher.com/) site to get `<pusher-app-key>` and `<pusher-app-cluster>` variables.
Replace `<host>` and `<port>` according to your backend URL. You should register an account and create an application on [Pusher](https://pusher.com/) site to get `<pusher-app-key>` and `<pusher-app-cluster>` variables. These credentials also should be used on the backend.

After that application is ready. You can run it in development mode with `yarn run serve` or `yarn run build` to generate compiled and minified files.
26 changes: 26 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@
[![StyleCI](https://github.styleci.io/repos/178824653/shield)](https://styleci.io/repos/178824653)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)

## Technologies

Backend:

* PHP 7.2 || 7.3
* [Laravel 5.8](https://laravel.com)
* [Docker](https://www.docker.com/)
* [Docker-compose](https://docs.docker.com/compose/)
* [Beanstalkd](https://github.com/beanstalkd/beanstalkd) - message queue (очередь сообщений для обработки тяжелых задач асинхронно)
* [REST API](https://ru.wikipedia.org/wiki/REST)
* [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/CORS)
* [JWT](https://ru.wikipedia.org/wiki/JSON_Web_Token) tokens
* Websockets and [Pusher](https://pusher.com/) service
* MySQL 5.7

Frontend:

* [Vue.js](https://vuejs.org/) framework
* [vue-cli](https://cli.vuejs.org/)
* [vue-router](https://router.vuejs.org/)
* [vuex](https://vuex.vuejs.org/)
* [Buefy](https://buefy.org/) UI framework
* [pusher-js](https://github.com/pusher/pusher-js)

Application link [https://bsa-thread.now.sh](https://bsa-thread.now.sh).

## Install

Installation is described inside backend and frontend folders independently.
Expand Down