Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pandakn/react-nest-take-home
repo for take home assignment
https://github.com/pandakn/react-nest-take-home
docker nestjs reactjs shadcn-ui take-home-test
Last synced: 7 days ago
JSON representation
repo for take home assignment
- Host: GitHub
- URL: https://github.com/pandakn/react-nest-take-home
- Owner: pandakn
- Created: 2024-03-26T18:56:08.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-26T19:33:14.000Z (10 months ago)
- Last Synced: 2024-11-11T14:20:33.173Z (2 months ago)
- Topics: docker, nestjs, reactjs, shadcn-ui, take-home-test
- Language: TypeScript
- Homepage:
- Size: 12.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-Nestjs Take Home Assignment
## Getting started ๐
Clone this repository
```zsh
git clone https://github.com/pandakn/react-nest-take-home.gitcd react-nest-take-home
```Install dependencies using `npm`
```zsh
cd client
npm installcd server
npm install
```After this step, you will get `node_modules` folder in the root of the project.
### Start Docker Compose for Database ๐ณ
```zsh
docker-compose -p blog-take-home-dev -f docker-compose-dev.yml up -d
```### Setup .env for Database ๐ณ
```zsh
// Create a `.env` file in the root of the project.
touch .env// .env
POSTGRES_HOST=host.docker.internal
POSTGRES_PORT=5432
POSTGRES_USER=pandakn
POSTGRES_PASSWORD=secretpassword
POSTGRES_DB=blog_take_home
```### Setup .env for Client ๐
```zsh
cd client
touch .env// .env
VITE_API_URL=http://localhost:8080
```### Setup .env for Server ๐
```zsh
cd server
touch .env// .env
NODE_ENV=development
APP_PORT=8080PUBLIC_KEY=GP+ycIZcNictqKJcKzlAFdMFhshX60n3K8Q6LQjPxDA
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=pandakn
POSTGRES_PASSWORD=secretpassword
POSTGRES_DB=blog_take_home# cli for generate a secure random string -> `openssl rand -base64 32`
JWT_SECRET_KEY=KFSBsWrhiNipEf2g/4Slh2jREDw0mtFKwFfu+DWXrog
```> **Note** : You can find all `.env` file configurations in `.env.example` each folder
### Start Client ๐
```zsh
cd clientnpm run dev
```The frontend will run at [localhost:3000](http://localhost:3000) or you can port change
### Start Server ๐
```zsh
cd servernpm run start:dev
```The backend will run at [localhost:8080](http://localhost:8080) or you can port change
### Run Seed Data ๐ฑ
```zsh
cd servernpm run seed:run
```### How to run test backend ๐งช
```zsh
cd servernpm run test
```> **Note** : This test for `users.service.ts` is so simple because I am learning unit testing and TDD. I'm ready to improve myself.
### Mock User for Login
username: takehome
password: 12345678# Screenshot ๐ธ
![image](./screenshots/login.png)
![image](/screenshots/home.png)
![image](/screenshots/post.png)
![image](/screenshots/tag.png)