Traffic Management System for Coastal Regions. Developed for ASEAN-India Hackathon 2021 - PS7 and won Encouragement Award.
For Frontend- Refer to Shipper-Web
- Postgresql Installed and Configured on the system
- Node.js Installed
Make sure you have set the following environment variables. You can also use a .env file. An .env.example
file is provided in the repo.
DATABASE_URL
Url of the Postgresql Database. For Eg.
postgresql://postgres:postgres@localhost:5432/shipper
PORT
Port on which you want the server to run. For Eg. 4000
If you change this, you have to make appropriate changes indocker-compose.yml
FRONTEND_URL
URL on which the Frontend (Shipper-Web) is running Gor Eg.
http://localhost:3000
. If this is incorrect, you will face CORS issues
DB_ENABLE_SSL
set to
true
for enabling SSL connection to the database. Only set to true when deploying and your database provider only supports SSL
yarn install
or
npm install
yarn dev
or
npm run dev
This will start a develoment server for the frontend on http://localhost:4000
This will create necessary tables in the database. Required to run only once.
yarn init-database
This will create a production build that can be deployed.
yarn build
or
npm run build
yarn start
OR
npm run start
For Deploying, you can use Docker (with Docker Compose).
The project is configured to use its own Postgresql Database, so make sure either the hosts port
5432
is free or map the port for docker containershipper_db
to another port and make changes toshipper_server
s environment variables section.
docker-compose up --build
The server uses Socket.io to provide Bi-Directional Communication to all clients connected as the location of ships changes. The Updated data is then stored in the database.
Build and Start the Frontend Server (Shipper-Web), make sure the API_URL is properly configured and follow the instructions in Getting Started.
You are free to modify the code. Redistributions are not allowed without prior request from the original author. You are obligated to include the full license and the copyrights.