https://github.com/renanrudney/roomeo_server
A fictional 'video server' to manage conference rooms!
https://github.com/renanrudney/roomeo_server
clean-architecture dto infra node node-js nodejs repositories services tdd tdd-javascript typeorm typescript
Last synced: about 1 month ago
JSON representation
A fictional 'video server' to manage conference rooms!
- Host: GitHub
- URL: https://github.com/renanrudney/roomeo_server
- Owner: renanrudney
- Created: 2020-08-27T01:59:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-30T22:03:07.000Z (almost 6 years ago)
- Last Synced: 2025-02-25T17:48:03.767Z (over 1 year ago)
- Topics: clean-architecture, dto, infra, node, node-js, nodejs, repositories, services, tdd, tdd-javascript, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 335 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Room + Video = Roomeo
“A fictional video server”!
You can manage users and conference rooms.
DDD, TDD, SOLID? Humm, is cheap ? Show me the code!
## Prerequisites
Before you begin, ensure you have met the following requirements:
* You have installed the 12.x version of [NodeJS](https://nodejs.org/en/download/)
* You have a [Yarn](https://classic.yarnpkg.com/en/docs/install) 1.x version or NPM.
* You have created psql databases: roomeo_pg, roomeo_test
* **or** run docker and create databases: roomeo_pg, roomeo_test
```❯ docker run --name roomeo_pg -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres```
## Installing Project
To install dependencies, run:
```
yarn install
yarn typeorm migration:run
```
## Using Project
To use, follow these steps:
```
yarn dev:server
```
Or run tests:
```
yarn test
```
### Aplication Routes
If you want to test on insomnia, postman or similar: [Import this json](./roomeo_api_routes.json).
- **`GET /users`** : list all users;
- **`GET /users/:username`** : user information;
- **`POST /users`** { `username`, `password`, `mobile_token`} : create and authenticate a user;
- **`POST /authenticate`** { `username`, `password` } : authenticate user;
- **`PUT /users`** { `mobile_token`, `password` } : update current authenticated user;
- **`DELETE /users`** : deleted current authenticated user;
- **`POST /rooms`** { `name`, `capacity` } : create and host a room;
- **`GET /rooms/:guid`** : room information;
- **`POST /rooms/:guid/join`** : joins room and show room information;
- **`POST /rooms/:guid/leave`** : leaves room;
- **`PATCH /rooms/:guid`** : change room host;
- **`GET /rooms/?username=:username`** : list of rooms that the user is in;
## Contributing
To contribute to "roomeo_server", follow these steps:
1. Fork this repository.
2. Create a branch: `git checkout -b `.
3. Make your changes and commit them: `git commit -m ''`
4. Push to the original branch: `git push origin /`
5. Create the pull request.
Alternatively see the GitHub documentation on [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).