https://github.com/vtereshyn/realty
Web and mobile application for renting an apartment
https://github.com/vtereshyn/realty
Last synced: about 2 months ago
JSON representation
Web and mobile application for renting an apartment
- Host: GitHub
- URL: https://github.com/vtereshyn/realty
- Owner: vtereshyn
- Created: 2021-09-07T07:45:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-08T18:55:58.000Z (over 3 years ago)
- Last Synced: 2025-02-14T22:52:31.745Z (4 months ago)
- Language: TypeScript
- Size: 396 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Web and mobile app for renting apartments
This is pet project implemented using React, Nest JS, GraphQL, SQL. There is a plan to create a mobile version using React Native.
## Setup
## Local development
Install dependencies
```ssh
yarn
```#### Create .env file in both *client* and *server*
*Client*:
```ssh
REACT_APP_API_URL=http://localhost:3000/graphql
REACT_APP_GOOGLE_MAP_API_KEY=
```*Server*:
```ssh
DB_USERNAME=
DB_PASSWORD=JWT_SECRET=
UNSPLASH_ACCESS_KEY=
UNSPLASH_SECRET_KEY=GOOGLE_MAP_API_KEY=
```#### Build
Build server
```ssh
yarn build:server
```Run Docker
```ssh
yarn docker:start
```Run database migrations (needed only for first running or if entities have been changed)
```ssh
yarn db:migrate
```#### Start application
Run server and client separately
```ssh
yarn start:client
yarn start:server
```or run both at the same time
```ssh
yarn start
```Seed data for testing (needed only for first running)
```ssh
yarn db:seed
```### GraphQL
During development you might want to change your *schema.graphql* file to apply implented queries and mutations. To fetch the latest changes from that schema file to client simply run
```ssh
yarn gql:generate
```This command will fetch all Typescript types that needed for development and also will generate hooks for GraphQL queries and mutations
### Linting
To run eslint do
```ssh
yarn lint
```This command will fix possible lint issue and will create a report with errors and warning that were found.