This is the frontend for the Predico Collabforecast service. It is a React application that allows users to interact with the service documentation and for administrators to invite and manage user access to the platform.
-
Node.js: You will need Node.js installed on your machine. Download it from the official website.
-
Docker (Optional): Docker is required for building and running the production version of the application. Visit the Docker website for installation instructions.
- Clone the repository:
git clone git@github.com:INESCTEC/predico-collabforecast.git
cd predico-collabforecast/frontend
- Install dependencies:
npm install
- Start the development server:
npm start
The application will be available at http://localhost:3000
.
- Build the dependencies:
npm run build
- Serve the application:
npm install -g serve
serve -s build
- Clear the docker cache: If you’ve made any changes to the frontend module, clear Docker caches thoroughly before rebuilding images. Docker might still be using cached layers or containers.
docker volume rm predico_frontend_build
- Build the Docker image:
docker-compose -f docker-compose.prod.yml build frontend
- Run the Docker container:
docker-compose -f docker-compose.prod.yml up frontend
The frontend application requires the following environment variables to be set:
- REACT_APP_API_URL=https://predico.inesctec.pt/api/v1
- REACT_APP_BASE_URL=https://predico.inesctec.pt
- REACT_APP_EMAIL=predico@example.com
- To be defined
- Invite users and manage user roles.
- Monitor platform access logs and activity.
Clearing Caches and Resetting
- Clearing Caches and Resetting
rm -rf node_modules
npm install
- Remove Docker containers and volumes:
docker-compose -f docker-compose.prod.yml down
docker volume rm predico_frontend_build
- Rebuild and restart the services:
docker-compose -f docker-compose.prod.yml build frontend
docker-compose -f docker-compose.prod.yml up -d