Comfy Studio is a second-hand furnitures webstore developed from scratch in a group of ten classmates.
Spread over two weeks, our group was divided in two, with one half working on the back-end, while the other worked on the front, before exchanging roles during the second week.
Creating this webstore application from scratch, we had complete liberty over our choice of technologies. The front-end of the project was hence developed using React.js and Tailwind.css for styles. Being the first project where we had to create an entire back-end side of the application, my personal choice was to lean over the MERN stack (Mongo DB, Express.js, React.js, Node.js) for the entire project. However, prefering to practice our recently acquired MySQL skills, we decided to lean over a back-end side done in Node.js, Express.js and raw MySQL using Node.js Sequelize module.
Before anything, make sure you have the latest versions of Node.js, MySQL and MySQLWorkbench are installed on your computer.
Import all the sql files present in the mysql_database directory in MySQLWorkbench in a new schema that you will call: comfy_studio.
Clone the repository:
git clone git@github.com:Gabrielparizet/Comfy_Studio.git
Change directory in the api directory:
cd api
Install NPM packages:
npm install
Create a .env file at the root of the api directory. Make sure this file is added to the .gitignore file.
Fill this file according to your MySQL database name, username and password:
database = comfy_studio
user = root
password = your_mysql_password
Remaining in the api directory, go to bin/www and change the port number on line 15 to the number of your choice. Here, we use port number '9000'.
Your api directory is ready to run.
Go back to the root of the Comfy_Studio directory in your terminal and change directory into the client directory:
cd ..
cd client
Install NPM packages:
npm install
Your client directory is ready to run.
First of all, make sure your MySQL server is running on your computer.
Then, go back to the root of the Comfy_Studio directory in your terminal and change directory to the api directory:
cd ..
cd api
Still in your terminal, run the command:
npm start
This will launch the express.js server which should be running on the port you define earlier in api/bin/www, in our case that is port '9000'.
Open a new terminal in the Comfy_Studio directory.
Change directory to go into the client directory:
cd client
Run the command:
npm start
This will launch the React.js application in which should be running on port number '3000'.
That's it, the Comfy_Studio application is running on your computer! Enjoy!