Trello board: https://trello.com/b/XoVn7s2F
Database Scheme: https://www.dbdesigner.net/designer/schema/172591
Backend codes for the project ChatWithPeople web application. This project was part of my studies about JWT and GraphQL.
Chat with people is a social networking application.
- It's a simple chat application that uses JWT and GraphQL.
- Account registration.
- Email verification (I used mailtrap)
- Sign in.
- Search for users (name, email, or username).
- Initiate chat with other users. You can even chat yourself (if it makes you happy).
- Create group chats and invite other users.
- WorkBox
- ExpressJS
- React-Dom
- React-Native
- React-Redux
- React-Router
- Redux-Saga
- Axios
- Socket.io
- GraphQL
- JWT
- Sequelize
- SASS
- Smart-Input-Validator
- Redux-Abstract
- Babel
- Nodemon
- Webpack
- Autoprefixer
- ESLint
git clone git@github.com:aprilmintacpineda/chat-with-people-backend.git
cd chat-with-people-backend
npm i
npm run config:init
Edit src/config/sequelize.json
. It should look something like this:
{
"development": {
"username": "root",
"password": null,
"database": "chat_with_people",
"host": "127.0.0.1",
"dialect": "mysql"
},
// ......
After you have set that up, you can create the database and run the migration by running npm run db:install
. You can also re-install it from (if for some reason you want that) by running npm run db:reinstall
.
- If you are going to run production mode, you need to edit the
production
key as well.
Edit src/config/nodemailer.js
. I use mailtrap to test my emails. It would look something like this:
{
host: 'smtp.mailtrap.io',
port: 2525,
secure: false, // true for 465, false for other ports
auth: {
user: 'your-username',
pass: 'your-password'
}
}
For more details, please checkout nodemailer's documentation.
npm run webpack
npm run start
This command will both build the code and create a production server using the build codes.
npm run start:production
Now you can access the web interface via localhost:3000
.
npm run eslint
should run eslint againstresources/js
andsrc/
folders.npm run build
should usebabel
to build all files insrc/
folder.
Once you're done looking at it, and you've decided to delete the whole thing.
npm run db:uninstall
cd ..
rm -rf chat-with-people-backend
rm -rf chat-with-people-mobile
That should:
- Delete the database.
- Delete the backend and the web interface source code.
- Delete the mobile source code.
MIT
Created with <3 by April Mintac Pineda.
Credits to the open source projects that I used for this project.