/models

Take Home Assignment for https://fabrik.space/

Primary LanguageTypeScriptMIT LicenseMIT

models

Live Deployment


Setup Local Development

Clone the Repository and cd to to models

git clone https://github.com/ish-u/models.git
cd models

Setup Server

  • Go to server folder and install packages

    cd server
    npm i
  • Create a .env file in the server folder

  • Copy the variables from .env.sample to .env and fill the required variables

    • Setup MongoDB using Atlas using Atlas UI and get the MONGO DB URI or provide the URI of loacally installed MongoDB

    • Generate SESSION SECRET using by running require('crypto').randomBytes(64).toString('hex') in node console

    • Setup S3 Storage in AWS Console - S3 Documentation

    • The Final .env will look like this

      PORT=5000
      DB_URI=*MONGO DB URI*
      SESSION_SECRET=*SESSION SECRET*
      BUCKET=*AWS S3 BUCKET NAME*
      AWS_ACCESS_KEY_ID=*YOUR AWS SECRET KEY ID*
      AWS_SECRET_ACCESS_KEY=*YOUR AWS SECRET ACCESS KEY*
      DEV=TRUE
      
  • Run the npm run dev to start the development server

  • The Server will be Live at http://localhost:5000

Setup Client

  • Go to models folder and install packages

    cd models
    npm i
  • Create a .env file in models folder and add the following to it

    VITE_API_URL=http://localhost:5000
    
  • Run the npm run dev to start the development server

  • The Client will be Live at http://localhost:5713

References

  1. three.js - Link
  2. AWS JS SDK v3 - Link
  3. multer - Link
  4. multer-S3 - Link
  5. passportjs - Link
  6. mongoose - Link
  7. tailwindcss - Link
  8. vite - Link
this was a really fun assignment; thank you for giving me the oppurtunity.