A React.js web application that allows users to run SQL queries, view mock query results, and toggle between predefined queries and their corresponding data tables. It also supports viewing large SQL table data from CSV files.
β
Execute SQL queries and display results in a table format.
β
Toggle between predefined SQL queries and their corresponding table data.
β
View mock data from CSV files with lazy Loading.
β
Interactive dropdowns for table selection.
β
Smooth and stylish UI with CSS styling and dark mode compatibility.
β
Store history so that can be used any time if needed again.
β
AI feature to convert Natural language to sql Query any time you need.
β
Help Section
β
Multiple Tab to run multiple Query as and when needed.
β
Different Layout options as per the user requirement.
- Frontend: React.js, HTML, CSS
- State Management: Context API
- CSV Data Handling:
papaparse(for parsing CSV files) - Dropdown Component:
react-dropdown - Styling: CSS Variables for light/dark mode support
We measured the page load time using:
- Google Lighthouse (Chrome DevTools)
- Open DevTools (
F12in Chrome). - Navigate to the Lighthouse tab.
- Run an audit to get metrics like FCP, LCP, CLS, TBT, and INP.
- Open DevTools (
- Network Tab in Chrome DevTools
- Open DevTools β Network tab.
- Reload the page and check DOMContentLoaded and Load Time.
- Largest Contentful Paint (LCP): ~0.36s
- Cumulative Layout Shift (CLS): 0.09
- Load time: ~646ms
To enhance performance and reduce load time, we implemented the following optimizations:
β
Lazy loading components (React.lazy + Suspense) for faster initial load.
β
Removed unused JavaScript with Tree Shaking.
β
Converted images to WebP format for better compression.
β
Used lazy loading for images (loading="lazy" attribute).
git clone https://github.com/Suryanra/sqlmagic.git
cd sqlmagicnpm installnpm startβββ public
β βββ data # CSV files
β β βββ employee.csv
β β βββ products.csv
β β βββ orders.csv
β β βββ courses.csv
| | βββcustomers.csv
β βββ index.html
β βββ favicon.ico
β
βββ src
β βββ components
β β βββ style
β βββ context
β β βββ AppContext.js
β β βββ AppPrvider.js
β βββ App.js
β βββ index.js
β
βββ .gitignore
βββ package.json
βββ README.md
βββ yarn.lock / package-lock.json
- Use the dropdown to choose between:
- Employee Data
- Teacher Data
- Orders Data
- Courses Data
- You can also View the table Schema
- History of all the Query you have run
- Use the query terminal to enter SQL queries.
- Click "Run" to display mock data results.
- You can Open and close multiple tab as per your requirement.
- Click the dark mode toggle button to switch between light and dark themes.
- You can change the different layout as per the requirement.
- Have AI chat bot that give support to convert the natural language to sql query.
- It also provide the explanation of the query generated
-Add the Help section for the users.
β
Table Selection with Dropdown

"dependencies": {
"react": "^18.0.0",
"react-dropdown": "^1.11.0",
"papaparse": "^5.3.0",
"react-scripts": "5.0.1"
}π§ Email: suryapratapnra@gmail.com
π Portfolio: https://surya-portfolio-three.vercel.app/







