Chat with strangers anonymously.
View Demo
Table of Contents
A real-time messaging platform for chatting anonymously:
- A user can create an account
- A user login into their account
- A user can chat with other online users in real-time via websockets
- Go
- PostgreSQL
- Websocket
- Vanilla JS
- Postman
https://chatty-5o1n.onrender.com/docs
POST /api/v1/auth/signup
Example request body:
{
"email": "test.user@gmail.com",
"password": "HelloMrWsa@88",
"confirmPassword": "HelloMrWsa@88"
}
Required fields: email
, password
, confirmPassword
POST /api/v1/auth/login
Example request body:
{
"email": "test.user@gmail.com",
"password": "HelloMrWsa@88"
}
Required fields: email
, password
WS /ws/chat?auth_token=token_here
Required query param: auth_token
- 200 for OK
- 201 for new user account successfully created
- 400 for Bad requests
- 401 Unauthorized
- 404 for Not found requests, when a resource can't be found to fulfill the request
- 409 for conflicting requests
- 500 for Internal Server Error
- To run this project, make sure you have Go and PostgreSQL installed on your machine.
-
Clone the repo
git clone https://github.com/rafmme/anony-chat.git
-
Rename the
.env.sample
file to.env
and populate the variables with the right dataPORT="6777" DB_HOST="127.0.0.1" DB_PORT="5432" DB_NAME="chatapp" DB_USER="user" DB_PASSWORD="password" SECRET_KEY="KeepAtItBoy!" BOT_KEY="xssduifgATA4qwer6078-99y7654wsxghcvr5rfvhvmgcvv"
-
Run this command
make run
ormake start
to start up the application.
Distributed under the MIT License. See LICENSE.txt
for more information.