Follow these steps to set up and run the Visitor Gate Pass project on your system.
Before you begin, ensure you have the following installed on your system:
- MongoDB: Install MongoDB along with MongoDB Compass and mongosh.
- Visual Studio Code (VSCode): Install VSCode and the following optional extensions for a better development experience:
- ES7+ React/Redux/React-Native snippets
- HTML CSS Support
- IntelliCode
- IntelliCode API Usage Examples
- MongoDB for VS Code
- Tailwind CSS IntelliSense
- Node.js: Install Node.js.
- Java Development Kit (JDK): Install JDK 21.
- IntelliJ IDEA Community Edition: Install IntelliJ IDEA Community Edition.
- Open a terminal and clone the repository:
git clone <repository-url> Visitor_Gate_Pass
- Open the cloned repository in VSCode:
code Visitor_Gate_Pass
-
Start the Server:
- Open a terminal in VSCode and navigate to the
serverfolder:cd server - Start the server:
npm start
- Open a terminal in VSCode and navigate to the
-
Start the Client:
- Open another terminal in VSCode by clicking the plus button (
+) in the terminal tab. - Navigate to the
KJC_Gate_Passfolder:cd KJC_Gate_Pass - Start the client:
npm run dev
If this is the first time you are loading the project, you might encounter some errors. Use ChatGPT or refer to the project's documentation to resolve them.
- Open another terminal in VSCode by clicking the plus button (
If everything is working fine, the frontend setup is complete. Note that you will not be able to log in because the database is not set up yet.
-
Start MongoDB:
- Open MongoDB Compass and connect to your local MongoDB server. This step will start the MongoDB server if it is not already running.
-
Load the Database:
- Open IntelliJ IDEA and open the
Documentsfolder within theVisitor_Gate_Passrepository as a project. - Locate and run the
Loading_Database.javafile. This will create a database namedvisitor_managementon your local MongoDB server with the collectionsvisitors,visitor_sessions,visitor_groups,visitor_cards, andusers, and populate them with initial data/documents.
- Open IntelliJ IDEA and open the
Your website is now set up and ready for further development. Good luck!
Feel free to modify this README to suit your project's specific needs.
Sources Branch managed by Anthony Pinto.