Lissone / lix-attendance

Talk to an admin to clear all your doubts in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LixAttendance logo

Description   |    Requirements   |    Technologies   |    Usage   |    Demonstration


License Repo size Top lang Stars repo Forks repo Pull requests Last commit

Report bug · Request feature


Description

Project developed with the intention of deepening knowledge in websockets with real-time applications and integration with htttp servers.

It consists of a support chat site between customer with question and admin respondent, where admin can choose customer he wants to respond according to priority (based on time of message sent), and close his connection once queries are answered . Anyone can test the application in order to contract the service for their own website by contacting the responsible developer (myself).

The first version of the project was developed at the Next Level Week 5 (NLW) marathon, taught by Daniela Leão, from April 19 to 25, 2021.

Requirements

Technologies

Backend (Api)

  • Nodejs
  • Typescript
  • Express
  • Socket.io
  • TypeORM
  • SqlServer
  • ESLint

Front End

  • Nextjs
  • Typescript
  • StyledComponents
  • Socket.io-client
  • ESLint (Airbnb config + pessoal rules)
  • Prettier

Usage

You can clone it on your pc using the command:

git clone https://github.com/Lissone/lix-attendance.git
cd lix-attendance

Install dependencies using:

yarn
#or
npm install

Database configuration

You must create the database before running an api (dbLixAttendance).

// .\src\external\database\dbConfig.ts

const connection = createConnection({
  type: 'mssql',
  host: process.env.DB_HOST,
  port: 1433,
  username: process.env.DB_USERNAME,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
  entities: [**Entities**],
  synchronize: true,
  logging: false,
  options: {
    enableArithAbort: true
  }
})

Need to add environment variables in both projects:

# .\packages\web\.env.local

# DEFAULT
NEXT_PUBLIC_BASE_URL_API=http://localhost:5000
# .\packages\api\.env

# DEFAULT
PORT=5000
DB_USERNAME=sa
DB_PASSWORD=123456
DB_NAME=dbLixAttendance
DB_HOST=localhost

Run api:

cd .\packages\api\
yarn dev
#or
npm run dev

Run web:

cd .\packages\web\
yarn dev
#or
npm run dev

Demonstration

Demo LixAttendance

License

Distributed under the MIT License. See LICENSE for more information.

Made with ❤️ by Lissone


About

Talk to an admin to clear all your doubts in real time.


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%