This is 3D model Uploader and Viewer. Created using MERN stack.
* git clone https://github.com/sona1237/3D-model-new.git
* cd 3D-Model-Viewer
* cd client
* npm i
* npm run dev
* cd ..
* cd server
* npm start
>Root
->App
-->FileComponent
-->ShowCaseComponent
---->Model
- Upload 3D files (.gltb,glb,ftx).
- Save Models in DB
- Display 3D model.
-
Why choose a Framework ? Framework makes managing a lot of things easier. Managing state, library support, and routing are some of the key advantages of using frameworks.
-
Why React ? Three.js is a powerful javascript library that can be used to render 3D models in a browser. There is a library called React Three Fibre, that is built for React to work with 3D models and is maintained continuously. I used this library extensively and Also, React has a huge community, so you can always get some help whenever you are stuck
-
Bootstrap Bootstrap makes things easy, as it comes with a lot of prebuilt components. Also, it helps a lot in Layouting the components.
-
Node.js Since, I was using React.js (which is essentially a JS Front end framework) , using Node.js (a JS runtime environment) was a good choice. Besides, Node.js comes with a lot of advantage but the primary reason for choosing Node.js was to seemlessly integrate front-end back-end and MongoDb Databases.
-
Express.js Express.js is a fast and lightweight web application framework for Node.js. It provides a robust set of features for building web and mobile applications, APIs, and web services. I used it for routing, and handling CORS.
-
MongoDb Mongo is a NoSQL database. I used mongodb because there is no relation in the records that we are storing. MongoDB also has built-in features like GridFS, which allows for efficient storage and retrieval of large files.
-
Tailwind CSS Used Tailwind for adding styles to components. It is easy to use and brings a lot of customisability to the table.
{
This schema consists of the basic things that are required to store and render the model.
- data -> of Buffer type, to save the file
- mimeType -> metadata parameter of file
- filename-> File name
- description -> Description about the file
- timestamp-> to always get the latest file
- Upload the File and details From Front-end.
- Save the File to DB.
- Redirect to second page
- Display it on the second page.