Skip to content

Commit f7fea35

Browse files
authored
Merge pull request #87 from BinaryStudioAcademy/dev
Release 1.0.2
2 parents 81278cf + 5797be2 commit f7fea35

File tree

3 files changed

+105
-3
lines changed

3 files changed

+105
-3
lines changed

backend/readme.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1-
# BSA 2019 Thread backend
1+
# BSA 2019 Thread (backend)
2+
3+
## Technologies
4+
5+
* PHP 7.2 || 7.3
6+
* [Laravel 5.8](https://laravel.com)
7+
* [Docker](https://www.docker.com/)
8+
* [Docker-compose](https://docs.docker.com/compose/)
9+
* [Beanstalkd](https://github.com/beanstalkd/beanstalkd) - message queue (очередь сообщений для обработки тяжелых задач асинхронно)
10+
* [REST API](https://ru.wikipedia.org/wiki/REST)
11+
* [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/CORS)
12+
* [JWT](https://ru.wikipedia.org/wiki/JSON_Web_Token) tokens
13+
* Websockets and [Pusher](https://pusher.com/) service
14+
* MySQL 5.7
215

316
## Install
17+
18+
Set your .env vars:
19+
```bash
20+
cp .env.example .env
21+
```
22+
23+
### Launch local environment:
24+
25+
Step inside project directory
26+
```bash
27+
cd <project_dir>/backend
28+
```
29+
30+
Start application docker containers:
31+
``` bash
32+
docker-compose up -d
33+
```
34+
35+
Install composer dependencies and generate app key:
36+
```bash
37+
docker exec -it thread-app composer install
38+
docker exec -it thread-app php artisan key:generate
39+
```
40+
41+
Database migrations install (set proper .env vars)
42+
```bash
43+
docker exec -it thread-app php artisan migrate
44+
docker exec -it thread-app php artisan db:seed
45+
```
46+
47+
Generate jwt key and create link to public folder for file uploads (you should have `FILESYSTEM_DRIVER=public` in .env):
48+
```bash
49+
docker exec -it thread-app php artisan jwt:generate
50+
docker exec -it thread-app php artisan storage:link
51+
```
52+
53+
Application server should be ready on http://localhost:<APP_PORT>
54+
55+
Pusher websocket server install:
56+
* Create an account and application on [pusher.com](https://pusher.com/) and copy your credentials to your .env (`PUSHER_APP_ID=...`).
57+
* 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`
58+
59+
Emails processing .env settings (you can use [mailtrap](https://mailtrap.io/) or your smtp credentials like user@gmail.com):
60+
```dotenv
61+
MAIL_DRIVER=smtp
62+
MAIL_HOST=smtp.mailtrap.io
63+
MAIL_USERNAME=<mailtrap_key>
64+
MAIL_PASSWORD=<mailtrap_password>
65+
MAIL_PORT=587
66+
MAIL_FROM_ADDRESS=admin@thread.com
67+
MAIL_FROM_NAME="BSA Thread Admin"
68+
```
69+
70+
You can debug your app with [Telescope](https://laravel.com/docs/5.8/telescope) tool which is installed already :)

frontend/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# BSA 2019 Thread project (frontend)
22

3+
## Technologies
4+
5+
* [Vue.js](https://vuejs.org/) framework
6+
* [vue-cli](https://cli.vuejs.org/)
7+
* [vue-router](https://router.vuejs.org/)
8+
* [vuex](https://vuex.vuejs.org/)
9+
* [Buefy](https://buefy.org/) UI framework
10+
* [pusher-js](https://github.com/pusher/pusher-js)
11+
312
## Getting started
413

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

16-
Configure your .env.local
25+
Configure your `.env.local`:
1726
```
1827
VUE_APP_API_URL=http://<host>:<port>/api/v1
1928
VUE_APP_PUSHER_APP_KEY=<pusher-app-key>
2029
VUE_APP_PUSHER_APP_CLUSTER=<pusher-app-cluster>
2130
VUE_APP_PUSHER_APP_AUTH_ENDPOINT=http://<host>:<port>/broadcasting/auth
2231
```
2332

24-
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.
33+
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.
2534

2635
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.

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@
55
[![StyleCI](https://github.styleci.io/repos/178824653/shield)](https://styleci.io/repos/178824653)
66
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
77

8+
## Technologies
9+
10+
Backend:
11+
12+
* PHP 7.2 || 7.3
13+
* [Laravel 5.8](https://laravel.com)
14+
* [Docker](https://www.docker.com/)
15+
* [Docker-compose](https://docs.docker.com/compose/)
16+
* [Beanstalkd](https://github.com/beanstalkd/beanstalkd) - message queue (очередь сообщений для обработки тяжелых задач асинхронно)
17+
* [REST API](https://ru.wikipedia.org/wiki/REST)
18+
* [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/CORS)
19+
* [JWT](https://ru.wikipedia.org/wiki/JSON_Web_Token) tokens
20+
* Websockets and [Pusher](https://pusher.com/) service
21+
* MySQL 5.7
22+
23+
Frontend:
24+
25+
* [Vue.js](https://vuejs.org/) framework
26+
* [vue-cli](https://cli.vuejs.org/)
27+
* [vue-router](https://router.vuejs.org/)
28+
* [vuex](https://vuex.vuejs.org/)
29+
* [Buefy](https://buefy.org/) UI framework
30+
* [pusher-js](https://github.com/pusher/pusher-js)
31+
32+
Application link [https://bsa-thread.now.sh](https://bsa-thread.now.sh).
33+
834
## Install
935

1036
Installation is described inside backend and frontend folders independently.

0 commit comments

Comments
 (0)