I Tried to complete all the tasks as per requirement starting from Auth , Loan creation , Admin approval etc,,.
For this project Node , npm should be installed in your computer
For Node installation , Refer : Node Installation Guide
Verify the Node and npm installation with
node --versionnpm --version If you face difficulty with Nodejs Installtion Refer Medium trouble shooting Guide
- Clone the Repo
git clone https://github.com/Jayanth930/Techdome-Assignmentin8-assignment- Move to "/frontend" folder
cd frontend- Install the dependencies
npm install - Setup dotenv
touch .env- Add VITE_BACKEND_URL = http://localhost:${port} in -> port = port number should be the one you will be adding in backend's folder .env file
- start the frontend
npm run dev- Move to "/backend" folder from root
cd backend or cd ../backend (if you are in frontend folder)- Install the dependencies
npm install - Setup dotenv
touch .env- Add PORT = 3500 in .env file
- ADD SECRET = any value
- Add DATABASE_URL="postgresql://postgres:{password}@localhost:5432/{databasename}?schema=public"
- {password} = write your local password of PostgreSQL
- {databasename} = create a database in your local system of postgresSQL
- It can be any Database Url(postgreSQL) not only local as long as you have the DATABASE_URL and database setup
- Setup PosrgreSQL db by running
npm run deploy- The above script initializes and applies migrations to the database link provided in .env
- Now install the prisma client by running
npm i @prisma/client- when you ran npm run deploy prisma itself suggests you to install the prisma-client
- Now start the server
npm run start - The major problem might arise would be due to verison problem and also with global packages verion vs local package version
- In that regard one issue I faced was due to verison difference between global and local typescript version , so if any issues faced regarding setup , its better to uninstall global typescript package.
- I provided request.rest and admin.rest inside backend folder which basically includes all the available api endpoints.
Frontend Link : https://techdome-frontend.netlify.app/
Backend Link : https://techdome-assignment.onrender.com/ As this backend is on render it takes some time to spin up the container