Building a B2B Data Catalog for business to view and manage product listings with user authentication.
Hosting / Deployment:
Frontend: Vercel https://data-catalog-web-am3sabhkd-mukuflash03s-projects.vercel.app/
Backend: Heroku https://data-catalog-web-app-5161a8376316.herokuapp.com/
![Screenshot 2024-06-16 at 7 46 10 PM](https://private-user-images.githubusercontent.com/37911144/340219750-fda9861d-39ff-4aeb-b06c-c1c2847ecd49.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMzIyNjgsIm5iZiI6MTcyNjAzMTk2OCwicGF0aCI6Ii8zNzkxMTE0NC8zNDAyMTk3NTAtZmRhOTg2MWQtMzlmZi00YWViLWIwNmMtYzFjMjg0N2VjZDQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDA1MTkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU0MjFlYTU0MTIzY2VkYTI0MDNhYWVhOTU3ZmQ4ODJjMzM1NDE1ZmQ1NjhlOWZhOTYwZTI3ODNkZWEwMDAwYjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vp-2cHz0k7hqiD1vyGo0JejqGzIiH3Bd-A9JGLtv-1w)
![Screenshot 2024-06-16 at 7 46 33 PM](https://private-user-images.githubusercontent.com/37911144/340219867-18a9eb56-1905-4742-9da5-46530c9d33a3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMzIyNjgsIm5iZiI6MTcyNjAzMTk2OCwicGF0aCI6Ii8zNzkxMTE0NC8zNDAyMTk4NjctMThhOWViNTYtMTkwNS00NzQyLTlkYTUtNDY1MzBjOWQzM2EzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDA1MTkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTExOGU0OGUwOGMyNjY5NTljNzFjMDI5NDk3ZTE4OTcwYzI3ZGM1MTNiMDkyOGQ0ZWExYWVhZWQyMzM2OWU1Y2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YKXJTdNqv79dnZxDDUAa3oLQMRWURibwHtcZ5gBU4t8)
Primary Language: TypeScript
Frontend: Next.js Backend: Express.js Database: PostgreSQL
-
Clone the GitHub repository https://github.com/MukuFlash03/data-catalog-web-app
-
Database setup (Skip) I’ve used Heroku’s PostgreSQL database add-on since I was hosting my backend on Heroku as well. To run the application locally, any additional installation is not needed, as all the requests will be made to the Heroku PostgreSQL cloud instance.
However, I did install PostgreSQL and Heroku CLI locally to manage the Database via the Terminal command line for operations like Creating the tables initially, Deleting entries, Selecting entries. I will add information at the end on how to set the database access locally.
-
Create a .env file in backend/ directory and enter the values.
-
Navigate to the backend directory and install the node modules:
$ cd backend
$ npm install
- Navigate to the frontend directory and install the node modules:
$ cd frontend
$ npm install
- Switch to the backend directory and run this command to start the server:
$ npm run dev
- Switch to the frontend directory and run this command to start the client:
$ npm run dev
- Access the frontend client on the link given in the command output. Ideally should be http://localhost:3000 (unless any other process is running on port 3000 already).
Sample Dataset
{
"id": 1,
"product name": "Firm Graphics",
"data category": "Firmographic",
"Record count": 5250,
"fields": ["Company name","Company address","Website"]
% },
Dataset Generation
I generated the data using ChatGPT based on the sample data. I added the product_name field to the data since the requirements mentioned that products should be searchable by product_name but the sample data did not have the product_name field.
Dataset Loading
I wrote a Python script to load the product data into the database.
Tables: data_entries, users
Commands to Create Tables:
-- For auto-generating UUIDs
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE users ( _id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, email VARCHAR(255) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL );
CREATE TABLE data_entries ( _id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, id INTEGER, product_name TEXT, data_category TEXT, record_count INTEGER, fields TEXT[]);
![Screenshot 2024-06-17 at 12 41 47 AM](https://private-user-images.githubusercontent.com/37911144/340220868-f1b511d9-a6ea-4f5e-9cce-3aa813d9b0cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMzIyNjgsIm5iZiI6MTcyNjAzMTk2OCwicGF0aCI6Ii8zNzkxMTE0NC8zNDAyMjA4NjgtZjFiNTExZDktYTZlYS00ZjVlLTljY2UtM2FhODEzZDliMGNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDA1MTkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNjY5M2M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