This application gives the user the ability to select skills and see the courses curated by SawaUp.
- Node.js
- NPM
- Clone the repository
- Run
npm install
to install the dependencies - Run
npm run build
to build the application - Run
npm run dev
to start the application
The application is built using NextJS and Prisma. The application is structured as follows:
components
- Contains the components used in the applicationpages
- Contains the pages of the applicationpublic
- Contains the static files of the applicationstyles
- Contains the styles of the applicationtypes
- Contains the types used in the applicationprisma
- Contains the database schema and migrationslib
- Contains the helper functions used in the application
The database is a sqlite db file inside the prisma
folder. The database schema is defined in the prisma/schema.prisma
file. The database migrations are defined in the prisma/migrations
folder.
There are no APIs as such. The application uses the Prisma ORM to query the database. If I would have chose to store selected skills and favorite courses in the database I would have used the next pages/api
folder, but as sqlite data would be lost on every build anyway. I did not implement this feature.
The application uses the useEffect
hook to filter the courses based on the selected skills. The useEffect
hook is called every time the selected skills change. Inside the hook function courses are filtered based on total number of matched skills. A step by step explaination is present in the pages/index.tsx
file.
- Fetch video thumbnail from youtube
- Implement a better UI for courses carousel
- Persist selected skills and favourites in db in a separate table similar to user preferences