This project is a dumb solution to recreate BE and FE for chatgpt clone. It has FE made with CRA (Create-React-App) which communicates with an ExpressJS server.
- Node.js
- npm or yarn
- Docker
- A modern web browser
Run command in root directory
To make shell script executable
chmod +x run.sh
Run command in root directory to start script
./run.sh
With docker-compose:
npm run docker-dev-up
Or plain Docker:
docker-compose -f docker-compose.dev.yml up
Visit localhost at
http://localhost:3000
cd ./frontend
Run command in ./frontend
directory
npm install
Or you can use yarn
yarn install
Run command in ./frontend
directory
npm start
Or you can use yarn
yarn start
The server will start on
http://localhost:3000
cd ../backend
Run command in ./backend
directory
npm install
Or you can use yarn
yarn install
Run command in ./backend
directory
npm run dev
Or you can use yarn
yarn start
The server will start on
http://localhost:5000
- Delete a chat from react app
- Rename a chat from react app
- Github OAuth Button (Available in Server)
- Tests
- Infinite fetch
- React Query (TanStack Query)
- Automatic logout after expired session (axios interceptors)
- Compound component architecture (FE)
- Typescript
- MVC (BE)
- Docker
- Feature based architecture (FE)
- Custom hooks
- Design principles
- Husky pre-commit linting
- RLS policies on chats table