[Installation] Manual - sparc-software-hust/fmecg-web-server GitHub Wiki

Dưới đây là hướng dẫn để tự cài đặt các library/framework chạy repo. Các lib cần chuẩn bị:

Với Web/Server

  • NodeJS: version 20
  • ReactJS: version 18
  • MySQL: version 8.3.0

Với Mobile App

  • Flutter: version 3.16.9
  • Android Studio Java ver17
  • 1 chiếc điện thoại Android API 30 trở lên hoặc Android simulator

Với Chat Server

  • Elixir: version 1.16.2

NodeJS (server)

  • Make sure you have .env.dev file in folder.
  • Make sure you turn on MySQL server and config .env file with your SQL server.
cd server
npm install
npm run migration  # deprecated: for dummy data and development purpose (future: sequelize migrations)
npm start

If terminal shows Connection to MySQL database has been established successfully., back-end has been setup successfully.

ReactJS (ui_web)

  • Make sure you have .env in bin.
  1. Run the bin folder (required NodeJS v18 or higher version)
  • Bin is a small NodeJS project to authenticate in front-end with cookies because ReactJS can not process cookies and set header for network.
  • When deploying a project, Bin will help package reactjs, set up security information, login and registration, manage tokens and cookies easier. the first time running project
cd ui_web
npm install
npm run build
npm start
cd ui_web/bin
npm install
npm start

next time

cd ui_web
npm start
cd ui_web/bin
npm start

and if you don't need to modify ui_code just only run bin

cd ui_web/bin
npm start

NestJs (identity_service)

  • Identity_service is used to manage security on the entire project.
  • Make sure you have .env file in folder.
  • Make sure you turn on MySQL server and config .env file with your SQL server.
cd identity_service
npm install
npm run migration  # deprecated: for dummy data and development purpose (future: sequelize migrations)
npm start

with the first time running, maybe this project have error, but dont worry and run project again

Flutter (mobile app)

To connect to back-end in Flutter App, localhost is default in api_constant.dart, but if you are in trouble with localhost (with Android simulator) and cannot connect to API, use correct IP of your Internet instead of localhost.

Make sure you have turned on Android simulator.

cd mobile_app
flutter run

or Run without Debugging on VSCode.

Chat Server

  • Only have installation with Docker, if you want to install manually, please contact to maintainer.