Quill is a full stack real-time chat application I am building.
The backend is running NestJS with TypeORM for the database. It has all the basic stuff working like real time messages, personalisation, group and private messaging
I've still got to finish off the front end, add all the cool functionality you would expect from a chat app like Slack or Discord before this is done.
There are a few pre-requisites you will need before starting in order for the project to build successfully:
- Yarn: This project is using yarn, so if you wish to use another package manager you will need to update the scripts in
package.json
- Postgres: If you wish to use another db type, such as mysql, you will need to update
/apps/quill-backend/app/app.module.ts
- Create a
.env
file in/apps/quill-backend
and populate it with the following
PORT=value_goes_here # The port the express server will run on
COOKIE_SECRET=value_goes_here # A good secret for session serialisation
COOKIE_MAX_AGE=86400000 # 24 Hours (Adjust as desired for a longer session time)
SESSION_NAME=quill_sessionID # Change if desired
DB_HOST=value_goes_here # Probably localhost, but depends on your configuration
DB_PORT=value_goes_here # Port for your database provider, mine is running in a docker container
DB_USERNAME=username # Your postgres user creds
DB_PASSWORD=password # Your postgres user creds
DB_NAME=quill # Change if desired
FILE_UPLOAD_DESTINATION= # The path where you want uploaded files to go, eg ~/User/{path_to_repo}/quill/assets/images
- Create a
.env.local
file in/apps/quill-frontend
and populate it with the following:
NEXT_PUBLIC_SOCKET_URI= Url the backend is running on, probably http://localhost:3001
- Create a database with the name you specified in
DB_NAME
- Run
yarn
to install all dependencies
Once you've finished setting up, you can run it with the following commands:
yarn start:backend # Start the backend first
yarn start:frontend