This is my submission for the Backend Developer role at MoveInSync.
The problem statement is to develop an Intelligent Floor Plan Management System for a Seamless Workspace Experience, provding features for users to upload room status, addressing potential conflicts during simultaneous updates.
I have implemented a CLI tool that can be used to provide the required functionalities from a given set of inputs. The tool is written in Python and uses the requests library to make the requests to the Go server.
Make sure Go, python and postgresql are installed on your system.
- Clone the repository
git clone https://github.com/0xt3j4s/FloorPlanXpert.git
- Navigate to the repository
cd FloorPlanXpert
- Initialize Go Modules
go mod init
- Download the dependencies
go get .
go mod tidy
- Create a database in PostgreSQL
sudo -u postgres psql
CREATE DATABASE floorplan;
- Create a username and password for the database
CREATE USER <username> WITH PASSWORD '<password>';
- Grant Permissions to the user
GRANT ALL PRIVILEGES ON DATABASE floorplan TO <username>;
-
Update the credentials of the database in the /internal/db/db.go file.
-
Run the server
go run cmd/main.go
- Open another terminal and run the CLI Tool
python app.py
- Follow the instructions on the CLI Tool to create a new room or book a room.