This project is a secure web portal for managing questionnaires and reports. It provides a full-stack solution with a React frontend and a Node.js/Express backend.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before running the application, you need to set up the environment variables for the server.
- Navigate to the
serverdirectory:cd server - Create a
.envfile by copying the example file:cp .env.example .env
- Open the
.envfile in a text editor and replaceyour_jwt_secretwith a secure, randomly generated string. This secret is used to sign the JSON Web Tokens (JWTs) for user authentication.
Before you begin, ensure you have the following installed on your system:
A Python script is provided to automate the installation of all dependencies and the startup of the application servers.
-
Open a terminal or command prompt in the root directory of the project.
-
Run the setup script using the following command:
python setup_and_start.py
- Installs Server Dependencies: It runs
npm installin theserverdirectory to install all the necessary backend packages. - Installs Client Dependencies: It runs
npm installin theclientdirectory to install all the necessary frontend packages. - Starts the Servers: It starts both the backend server and the frontend client in the background.
Once the script has finished, the application will be running.
- The backend server will be available at
http://localhost:5000. - The frontend client will be available at
http://localhost:3000.
You can view the server logs in server_setup.log and the client logs in client_setup.log. It may take a few moments for the client to become available after the script completes.