AIStoreHub Package Vault: Bulk Sms
Package Slug: bulk-sms
Archetype: tool
Upstream Repository: https://github.com/TMTanmay1/Bulk_sms
Workspace Files & Specifications (27 files)
- aistorehub.json (351 bytes)
{ "name": "Bulk Sms", "slug": "bulk-sms", "version": "1.0.0", "type": "tool", "description": "Open-source agent imported from GitHub.", "owner": "community", "repository": "catalog", "github_repo_url": "https://github.com/TMTanmay1/Bulk_sms", "tags": [ "javascript", "agent" ], "imported_at": "2026-11-21T23:56:29.490Z" } - client/package.json (1151 bytes)
{ "name": "client", "homepage": "http://agentcall.co/bulk-sms", "version": "0.1.0", "private": true, "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@mui/icons-material": "^5.15.14", "@mui/material": "^5.15.14", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "bootstrap": "^5.3.3", "lottie-web": "^5.12.2", "react": "^18.2.0", "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", "react-lottie": "^1.2.4", "react-router-dom": "^6.22.3", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } } - client/public/index.html (1769 bytes)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="../src/resource/Animation - 1711797452832.json" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site created using create-react-app" /> <link rel="apple-touch-icon" href="../src/resource/Animation - 1711797452832.json" /> <!-- manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <!-- Notice the use of %PUBLIC_URL% in the tags above. It will be replaced with the URL of the `public` folder during the build. Only files inside the `public` folder can be referenced from the HTML. Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> <title>BulkBuzz </title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> <!-- This HTML file is a template. If you open it directly in the browser, you will see an empty page. You can add webfonts, meta tags, or analytics to this file. The build step will place the bundled scripts into the <body> tag. To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> </body> </html> - client/public/manifest.json (492 bytes)
{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", "type": "image/png", "sizes": "512x512" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" } - client/public/robots.txt (67 bytes)
# https://www.robotstxt.org/robotstxt.html User-agent: * Disallow:
- client/README.md (3359 bytes)
# Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in your browser. The page will reload when you make changes.\ You may also see any lint errors in the console. ### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `npm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can't go back!** If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `npm run build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
- client/src/App.css (0 bytes)
- client/src/App.js (1484 bytes)
import React from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import 'bootstrap/dist/css/bootstrap.min.css'; // Bootstrap CSS import CssBaseline from '@mui/material/CssBaseline'; // MUI CSS reset import { GlobalStyles } from '@mui/styled-engine'; import './App.css'; import Sendmessageform from './sendmessageform'; // Import the component that contains your form import CreateCampaign from './createcampaign'; // Import the component that contains your form import Campaignsallinfo from './campaignsallinfo'; // Import the component that contains your form import Navbar from './navbar'; // Import the component that contains your form import Getallmessages from './getallmessages'; // Import the component that contains your form function App() { return ( <Router> <CssBaseline /> <GlobalStyles styles={{ '@keyframes gradientShift': { '0%': { backgroundPosition: '0% 50%' }, '50%': { backgroundPosition: '100% 50%' }, '100%': { backgroundPosition: '0% 50%' } } }} /> <Navbar /> <Routes> <Route path="/bulk-sms" element={<CreateCampaign />} /> <Route path="/bulk-sms/send-message" element={<Sendmessageform />} /> <Route path="/bulk-sms/campaigns-info" element={<Campaignsallinfo />} /> <Route path="/bulk-sms/get-all-messages" element={<Getallmessages />} /> </Routes> </Router> ); } export default App; - client/src/campaignsallinfo.css (2399 bytes)
/* campaignsallinfo.css */ .table { border-collapse: collapse; width: 90%; background-color: #fff; border-radius: 15px; overflow: hidden; /* Ensures the border radius clips the table content */ box-shadow: 0 10px 35px rgba(0,0,0,0.15); position: relative; transition: all 0.3s ease; height: 80%; margin-bottom: 50px; } .table::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 15px; z-index: -1; background: linear-gradient(145deg, #e6e6e6, #ffffff); transition: all 0.4s ease-in-out; } .table:hover::after { transform: scale(1.05); background: linear-gradient(145deg, #c8d0e7, #d4dfeb); } thead { background-color: #007bff; color: #ffffff; text-align: left; } th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; /* Adds a light border to each row */ } tbody tr:nth-child(even) { background-color: #f2f2f2; /* Zebra striping for rows */ } tbody tr:hover { background-color: #ddd; /* Hover effect for rows */ } th:first-child, td:first-child { border-top-left-radius: 15px; border-bottom-left-radius: 15px; } th:last-child, td:last-child { border-top-right-radius: 15px; border-bottom-right-radius: 15px; } /* campaignsallinfo.css */ .filter-input-container { margin-top: 20px; margin-bottom: 30px; display: flex; justify-content: center; gap: 20px; } .filter-input { position: relative; width: 240px; } .filter-input input { padding-left: 2.5rem !important; /* Increase padding to make room for the icon */ } .filter-input-icon { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); color: #6c757d; /* Bootstrap's default icon color */ } /* Add more styles here for animations, hover effects, etc. */ .filter-input-container { margin-top: 20px; margin-bottom: 30px; display: flex; justify-content: center; /* Centers the items horizontally */ gap: 20px; /* Adjust the space between the inputs */ } .table-responsivec{ position: relative; width: 100vw; overflow: auto; height: 100%; } .campaignallinfobut{ position:absolute; bottom: 50px; margin-right: -80%; } - client/src/campaignsallinfo.js (4905 bytes)
import React, { useEffect, useState } from 'react'; import { Container } from "react-bootstrap"; import 'bootstrap/dist/css/bootstrap.min.css'; import './campaignsallinfo.css'; import Button from '@mui/material/Button'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import ArrowBackIcon from '@mui/icons-material/ArrowBack'; import url from './resource/constants'; import TextField from '@mui/material/TextField'; function CampaignsPage() { const [campaigns, setCampaigns] = useState([]); const [currentPage, setCurrentPage] = useState(1); const [filterState, setFilterState] = useState(''); const [filterCity, setFilterCity] = useState(''); useEffect(() => { fetch(`https://localhost:5000/api/campaigns/${currentPage}`) // Adjust URL as necessary .then(response => response.json()) .then(data => { console.log(data); setCampaigns(data.data); // Assuming the backend returns an object with a 'data' array }) .catch(error => console.error('Error fetching data:', error)); }, [currentPage]); const handlePageChange = (event) => { const page = parseInt(event.target.value, 10); if (page > 0) { // Add additional checks as needed (e.g., maximum page number) setCurrentPage(page); } }; console.log(campaigns.count); return ( <Container className="d-flex flex-column align-items-center" style={{ minHeight: "100vh", marginTop: "20px" }}> <h2 className="mb-1 fw-bold">Campaigns List</h2> {/* Filters container with enhanced styling for visibility */} <div className="mb-4" style={{ width: '100%', padding: '20px', backgroundColor: '#f5f5f5', borderRadius: '8px', boxShadow: '0 2px 4px rgba(0,0,0,.1)' }}> <div className="filter-input-container d-flex justify-content-around"> <div className="filter-input"> <i className="bi bi-search filter-input-icon"></i> <input type="text" className="form-control" placeholder="Filter by State" value={filterState} onChange={e => setFilterState(e.target.value)} style={{ maxWidth: '200px' }} // Ensure inputs do not stretch too wide on larger screens /> </div> <div className="filter-input"> <i className="bi bi-search filter-input-icon"></i> <input type="text" className="form-control" placeholder="Filter by City" value={filterCity} onChange={e => setFilterCity(e.target.value)} style={{ maxWidth: '200px' }} // Consistent styling with state filter /> </div> </div> </div> {/* Table container */} <div className="table-responsivec" style={{ width: '100%' }}> <table className="table"> <thead> <tr> <th>ID</th> <th>Title</th> <th>Description</th> <th>Start Date</th> <th>End Date</th> <th>Message</th> <th>City</th> <th>State</th> <th>Count</th> </tr> </thead> <tbody> {campaigns.filter(campaign => (!filterState || campaign.state.toLowerCase().includes(filterState.toLowerCase())) && (!filterCity || campaign.city.toLowerCase().includes(filterCity.toLowerCase())) ).map((campaign) => ( <tr key={campaign.id}> <td>{campaign.id}</td> <td>{campaign.title}</td> <td>{campaign.description}</td> <td>{campaign.startDate}</td> <td>{campaign.endDate}</td> <td>{campaign.message}</td> <td>{campaign.city}</td> <td>{campaign.state}</td> <td>{campaign.count}</td> </tr> ))} </tbody> </table> </div> <div className='campaignallinfobut' style={{ display: 'flex', gap: '10px', marginTop: '20px' }}> <Button variant="contained" color="primary" size="small" onClick={() => setCurrentPage(currentPage => Math.max(1, currentPage - 1))} disabled={currentPage === 1} > <ArrowBackIcon /> </Button> <TextField size="small" variant="outlined" type="number" value={currentPage} onChange={handlePageChange} inputProps={{ min: 1, style: { textAlign: 'center' }, }} sx={{ width: '80px' }} // Adjust the width as necessary /> <Button variant="contained" color="secondary" size="small" onClick={() => setCurrentPage(currentPage => currentPage + 1)} > <ArrowForwardIcon /> </Button> </div> </Container> ); } export default CampaignsPage; - client/src/createcampaign.css (1397 bytes)
.greeting-message { font-size: 24px; /* Larger font size for emphasis */ font-weight: bold; /* Bold font weight */ color: #343a40; /* Dark grey color for high contrast */ text-align: center; /* Center align text */ margin-bottom: 20px; /* Spacing between text and button */ animation: fadeIn 2s ease-out; /* Animation for text appearance */ } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .create-campaign-button { display: block; /* Make button block to fit content width */ width: max-content; /* Adjust width to content size */ margin: 0 auto; /* Center button */ background-color: #007bff; /* Primary blue color */ color: white; border: none; border-radius: 5px; padding: 10px 20px; font-size: 16px; font-weight: bold; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); transition: all 0.3s; } .create-campaign-button:hover { background-color: #0056b3; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } .create-campaign-container { display: flex; justify-content: center; align-items: center; height: 100%; } .create-campaign-button:active { transform: translateY(1px); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); } - client/src/createcampaign.js (962 bytes)
import React from "react"; import { Container } from "react-bootstrap"; import { useNavigate } from "react-router-dom"; import "./createcampaign.css"; function HomePage() { const navigate = useNavigate(); const navigateToCreateCampaign = () => { navigate("/bulk-sms/send-message"); // Assuming your route to the campaign creation page is '/create-campaign' }; return ( <Container className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }} // Adjust the height as needed > <div className="custom-home-containerc"> <div className="greeting-message"> Hi Siddhant ! , Let's create another campaign </div> <button className="btn btn-primary create-campaign-button" onClick={navigateToCreateCampaign} > Create Campaign </button> </div> </Container> ); } export default HomePage; - client/src/getallmessages.css (2365 bytes)
/* App.css */ /* body { background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); background-size: 400% 400%; animation: backgroundMove 15s ease infinite; } */ /* @keyframes backgroundMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } */ .custom-form-container { padding: 40px; background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */ border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); width: 100%; max-width: 500px; margin: auto; /* Centering if not already centered */ } .custom-text-field .MuiOutlinedInput-root { background: #f5f7fa; border-radius: 5px; } .custom-text-field .MuiInputLabel-root { color: #6c757d; } .custom-send-button { background-color: #007bff; color: white; padding: 10px 15px; border-radius: 8px; border: 0; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; } .custom-send-button:hover, .custom-send-button:focus { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5); } /* Responsive adjustments */ @media (max-width: 768px) { .custom-form-container { margin: 20px; padding: 20px; } } .campaignallinfobut{ position: relative; bottom: 50px; margin-right: -80%; } .getallmessage-container { display: flex; /* Assuming you want to use flex. If it's grid, change this to grid. */ gap: 20px; flex-direction: column; /* Assuming you want a vertical layout. */ } .table { width: 100%; border-collapse: collapse; /* Optional: for removing space between cells */ /* Add any additional styling for your table */ } /* Ensure table cells are visually distinct and aligned */ .table th, .table td { text-align: left; padding: 8px; /* Adjust padding as needed */ /* Add any additional styling for table cells */ } /* Responsive adjustments */ .form-cont-gm{ display: flex; flex-direction: column; margin-top: 20px; margin-bottom: 50px; } .getallmessagesbut{ position:absolute; right: 1%; bottom: 0px; } @media (max-width: 768px) { /* Make the table */ .table { display: block; width: 100%; overflow-x: auto; /* Add horizontal scroll for smaller screens */ } } - client/src/getallmessages.js (5528 bytes)
import React, { useEffect, useState } from "react"; import { Container, Form } from "react-bootstrap"; import TextField from "@mui/material/TextField"; import MenuItem from "@mui/material/MenuItem"; import SendIcon from "@mui/icons-material/Send"; import "./getallmessages.css"; // Assuming your custom styles are here import 'bootstrap/dist/css/bootstrap.min.css'; import './campaignsallinfo.css'; import Button from '@mui/material/Button'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import ArrowBackIcon from '@mui/icons-material/ArrowBack'; import url from './resource/constants'; function App() { const [campaignNumber, setCampaignNumber] = useState(null); const [GtallmsgCurrentPage, setGtallmsgCurrentPage] = useState(1); const [selectedStatus, setSelectedStatus] = useState(""); const [listOfAllMessages, setListOfAllMessages] = useState([]); const status = [ { value: "failed", label: "Failed" }, { value: "sent", label: "Sent" }, { value: "delivered", label: "Delivered" }, ]; const handleGtallmsgPageChange = (event) => { const page = parseInt(event.target.value, 10); if (page >= 1) { // Ensure the page number is 1 or greater setGtallmsgCurrentPage(page); } }; useEffect(() => { fetch(`https://localhost:5000/api/getallmessages/${GtallmsgCurrentPage}`) // Adjusted for pagination .then(response => response.json()) .then(data => setListOfAllMessages(data.data)) .catch(error => console.error("Error fetching data:", error)); }, [GtallmsgCurrentPage]); // Depend on GtallmsgCurrentPage to refetch when it changes const updateStatus = async (e) => { e.preventDefault(); const response = await fetch(`${url}/twilio/update-status`); if (response.ok) { window.location.reload(); console.log("Request successful"); } else { console.error("Request failed"); } } return ( <Container className="d-flex flex-column justify-content-center position-relative " style={{ minHeight: "100vh" ,marginTop: "20px"}} > <div className="form-cont-gm custom-form-container" > <Form> {/* Campaign Name */} <TextField className="custom-text-field" label="Campaign Number" variant="outlined" fullWidth margin="normal" value={campaignNumber} onChange={(e) => setCampaignNumber(e.target.value)} type="number" // This makes the TextField accept numeric input required /> {/* State Dropdown */} <TextField select className="custom-text-field" label="Select Status" variant="outlined" fullWidth margin="normal" value={selectedStatus} onChange={(e) => { setSelectedStatus(e.target.value); }} required > {status.map((option) => ( <MenuItem key={option.value} value={option.value}> {option.label} </MenuItem> ))} </TextField> </Form> <button className="custom-send-button" onClick={updateStatus}> Update status <SendIcon /> </button> </div> {/* Table container */} <div className="table-responsivem " style={{ width: '100%', flexGrow: 1, overflow: 'auto' }}> <table className="table"> <thead> <tr> <th>ID</th> <th>Campaign ID</th> <th>Agent ID</th> <th>Send Date Time</th> <th>Status</th> <th>Twilio SID</th> </tr> </thead> <tbody> {listOfAllMessages.filter( (message) => (!selectedStatus || message.status .toLowerCase() .includes(selectedStatus.toLowerCase())) && (!campaignNumber || message.campaignID === Number(campaignNumber)) ) .map((message) => ( <tr key={message.ID}> <td>{message.ID}</td> <td>{message.campaignID}</td> <td>{message.agentID}</td> <td>{new Date(message.sendDateTime).toLocaleString()}</td> <td>{message.status}</td> <td>{message.twilioSid}</td> </tr> ))} </tbody> </table> </div> <div className='getallmessagesbut' style={{ display: 'flex', gap: '10px', }}> <Button variant="contained" color="primary" size="small" onClick={() => setGtallmsgCurrentPage(currentPage => Math.max(1, GtallmsgCurrentPage - 1))} disabled={GtallmsgCurrentPage === 1} > <ArrowBackIcon /> </Button> <TextField size="small" variant="outlined" type="number" value={GtallmsgCurrentPage} onChange={handleGtallmsgPageChange} inputProps={{ min: 1, style: { textAlign: 'center' }, }} sx={{ width: '80px' }} // Adjust the width as necessary /> <Button variant="contained" color="secondary" size="small" onClick={() => setGtallmsgCurrentPage(GtallmsgCurrentPage => GtallmsgCurrentPage + 1)} > <ArrowForwardIcon /> </Button> </div> </Container> ); } export default App; - client/src/index.js (513 bytes)
import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); - client/src/navbar.js (1592 bytes)
import React from 'react'; import { AppBar, Toolbar, Box, Button } from '@mui/material'; import { Link as RouterLink } from 'react-router-dom'; import Lottie from 'react-lottie'; import bulkSmsAnimation from './resource/Animation - 1711797452832.json'; // Adjust the path as necessary const defaultOptions = { loop: true, autoplay: true, animationData: bulkSmsAnimation, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } }; const Navbar = () => { return ( <AppBar position="sticky" sx={{ background: 'linear-gradient(-45deg, #23a6d5, #23d5ab)', boxShadow: 'none', color: 'white', padding: '0 24px', }}> <Toolbar sx={{ justifyContent: 'space-between', alignItems: 'center'}}> <Box sx={{ display: 'flex', alignItems: 'center'}}> <Lottie options={defaultOptions} height={60} width={60} /> </Box> <Box display="flex" gap="16px"> <Button component={RouterLink} to="/bulk-sms" sx={navLinkStyle}> Home </Button> <Button component={RouterLink} to="/bulk-sms/campaigns-info" sx={navLinkStyle}> List Campaigns </Button> <Button component={RouterLink} to="/bulk-sms/get-all-messages" sx={navLinkStyle}> List messages </Button> </Box> </Toolbar> </AppBar> ); } const navLinkStyle = { color: 'white', textDecoration: 'none', textTransform: 'none', fontSize: '1rem', '&:hover': { background: 'rgba(255, 255, 255, 0.2)', borderRadius: '4px' }, }; export default Navbar; - client/src/reportWebVitals.js (362 bytes)
const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } }; export default reportWebVitals; - client/src/resource/Animation - 1711797452832.json (172286 bytes)
{"v":"5.9.4","fr":60,"ip":0,"op":301,"w":1000,"h":1000,"nm":"F6150421N55","ddd":0,"assets":[{"id":"comp_0","nm":"coin and men","fr":60,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"35","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":192,"s":[0]},{"t":215.310546875,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":189,"s":[481.16,181.08,0],"to":[12.667,38.667,0],"ti":[-12.667,-38.667,0]},{"t":264.310546875,"s":[557.16,413.08,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.055,0.318],[2.262,0.532],[0,0],[0,0],[0,0],[0.648,-0.583],[0,0],[0,0],[0,0],[-0.116,2.561],[0,0],[0,0],[0,0.542],[0,0],[0,0],[-3.659,4.022],[9.396,1.41],[7.779,-0.132],[4.35,-2.264],[0,0],[-0.016,-3.836],[0,0],[0,0],[0,0],[0,0],[-0.484,-0.242],[0,0],[0,0],[-0.016,-0.158],[-1.923,-1.442],[0,0],[0,0],[0,0],[0.484,-0.726],[0,0],[0,0],[0,0],[0,-2.654],[0,0],[-0.892,-0.484],[-0.494,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.58],[0,0]],"o":[[-0.384,-2.229],[0,0],[0,0],[0,0],[-0.484,-0.726],[0,0],[0,0],[0,0],[2.051,-1.538],[0,0],[0,0],[0.484,-0.242],[0,0],[0,0],[0,0],[0,0],[-2.072,-2.712],[-4.472,0.076],[0,0],[-7.023,5.186],[0.006,1.387],[2.86,2.86],[0,0],[0,0],[0,0.542],[0,0],[0,0],[0.007,0.16],[0.241,2.377],[0,0],[0,0],[0,0],[-0.648,-0.583],[0,0],[0,0],[0,0],[-2.584,0.608],[0,0],[0,1.086],[0.405,0.22],[0,0],[0,0],[0,0],[0,0],[0,0],[1.58,0],[0,0],[0,-0.332]],"v":[[37.1,26.439],[32.773,21.846],[16.747,18.075],[17.162,17.164],[15.219,14.249],[13.072,13.98],[12.871,14.16],[12.871,8.94],[13.922,8.152],[17.345,1.677],[17.484,-1.374],[18.689,-1.977],[19.48,-3.256],[19.48,-7.843],[19.927,-7.148],[22.787,-17.159],[14.312,-36.012],[0,-41.472],[-17.221,-37.777],[-15.106,-36.332],[-23.014,-19.401],[-22.882,-17.159],[-20.022,-7.148],[-19.479,-7.69],[-19.479,-2.77],[-18.689,-1.491],[-17.461,-0.877],[-17.345,1.677],[-17.31,2.155],[-13.922,8.152],[-12.871,8.941],[-12.871,14.16],[-13.072,13.98],[-15.218,14.249],[-17.161,17.164],[-16.747,18.075],[-32.773,21.846],[-37.183,27.415],[-37.183,38.615],[-35.686,41.131],[-34.323,41.476],[-24.312,41.476],[-24.312,41.476],[24.312,41.476],[24.312,41.476],[34.323,41.476],[37.183,38.616],[37.183,27.415]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.407843142748,0.721568644047,0.701960802078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":187,"op":303,"st":187,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"34","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":198,"s":[0]},{"t":221.310546875,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":195,"s":[526.654,215.87,0],"to":[6.667,31,0],"ti":[-6.667,-31,0]},{"t":270.310546875,"s":[566.654,401.87,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[7.919,0],[0,0],[1.47,1.111],[0,0],[0.356,0.62],[16.625,0],[9.142,-4.903],[-15.859,-21.943],[-3.309,0.374],[1.045,-0.789],[0,0],[3.614,0],[0,0],[0,-7.92],[0,0],[-2.16,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.16],[0,0]],"o":[[0,0],[-3.614,0],[0,0],[-0.629,-0.489],[12.961,-11.443],[-2.282,-1.385],[-11.242,6.029],[0.013,0.018],[-0.375,1.104],[0,0],[-1.47,1.111],[0,0],[-7.919,0],[0,0],[0,2.16],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[2.16,0],[0,0],[0,-7.92]],"v":[[19.552,14.295],[19.118,14.295],[11.732,12.486],[11.732,12.434],[10.274,10.759],[11.732,-39.149],[-11.732,-39.149],[-16.946,10.385],[-9.686,9.589],[-11.732,12.479],[-11.732,12.486],[-19.119,14.295],[-19.553,14.295],[-33.891,28.635],[-33.891,37.759],[-29.981,41.669],[-11.732,41.669],[-7.821,41.669],[-3.233,41.669],[3.233,41.669],[10.428,41.669],[11.732,41.669],[29.981,41.669],[33.891,37.759],[33.891,28.635]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.04705882445,0.333333343267,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":187,"op":303,"st":187,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"33","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":204,"s":[0]},{"t":227.310546875,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":201,"s":[663.031,219.08,0],"to":[-3.333,33.333,0],"ti":[3.333,-33.333,0]},{"t":276.30859375,"s":[643.031,419.08,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.055,0.318],[2.262,0.532],[0,0],[0,0],[0,0],[0.648,-0.583],[0,0],[0,0],[0,0],[-0.116,2.561],[0,0],[0,0],[0,0.542],[0,0],[0,0],[-3.659,4.022],[9.396,1.41],[7.779,-0.132],[4.35,-2.264],[0,0],[-0.017,-3.836],[0,0],[0,0],[0,0],[0,0],[-0.484,-0.242],[0,0],[0,0],[-0.016,-0.158],[-1.923,-1.442],[0,0],[0,0],[0,0],[0.484,-0.726],[0,0],[0,0],[0,0],[0,-2.654],[0,0],[-0.892,-0.484],[-0.494,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.58],[0,0]],"o":[[-0.384,-2.229],[0,0],[0,0],[0,0],[-0.484,-0.726],[0,0],[0,0],[0,0],[2.051,-1.538],[0,0],[0,0],[0.485,-0.242],[0,0],[0,0],[0,0],[0,0],[-2.072,-2.712],[-4.472,0.076],[0,0],[-7.024,5.186],[0.006,1.387],[2.86,2.86],[0,0],[0,0],[0,0.542],[0,0],[0,0],[0.007,0.16],[0.241,2.377],[0,0],[0,0],[0,0],[-0.648,-0.583],[0,0],[0,0],[0,0],[-2.584,0.608],[0,0],[0,1.086],[0.405,0.22],[0,0],[0,0],[0,0],[0,0],[0,0],[1.58,0],[0,0],[0,-0.332]],"v":[[37.1,26.439],[32.773,21.846],[16.747,18.075],[17.162,17.164],[15.219,14.249],[13.072,13.98],[12.871,14.16],[12.871,8.94],[13.922,8.152],[17.345,1.677],[17.484,-1.374],[18.689,-1.977],[19.48,-3.256],[19.48,-7.843],[19.927,-7.148],[22.787,-17.159],[14.312,-36.012],[0,-41.472],[-17.221,-37.777],[-15.105,-36.332],[-23.014,-19.401],[-22.882,-17.159],[-20.022,-7.148],[-19.48,-7.69],[-19.48,-2.77],[-18.689,-1.491],[-17.461,-0.877],[-17.345,1.677],[-17.31,2.155],[-13.922,8.152],[-12.871,8.941],[-12.871,14.16],[-13.072,13.98],[-15.218,14.249],[-17.161,17.164],[-16.747,18.075],[-32.773,21.846],[-37.183,27.415],[-37.183,38.615],[-35.686,41.131],[-34.323,41.476],[-24.312,41.476],[-24.312,41.476],[24.312,41.476],[24.312,41.476],[34.323,41.476],[37.183,38.616],[37.183,27.415]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.211764708161,0.223529413342,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":187,"op":303,"st":187,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"32","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":210,"s":[0]},{"t":233.310546875,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":207,"s":[708.525,191.87,0],"to":[-10,36.667,0],"ti":[10,-36.667,0]},{"t":282.310546875,"s":[648.525,411.87,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[7.919,0],[0,0],[1.47,1.111],[0,0],[0.356,0.62],[16.625,0],[9.142,-4.903],[-15.859,-21.943],[-3.309,0.374],[1.045,-0.789],[0,0],[3.614,0],[0,0],[0,-7.92],[0,0],[-2.16,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.16],[0,0]],"o":[[0,0],[-3.614,0],[0,0],[-0.629,-0.489],[12.961,-11.443],[-2.282,-1.385],[-11.242,6.029],[0.013,0.018],[-0.375,1.104],[0,0],[-1.47,1.111],[0,0],[-7.919,0],[0,0],[0,2.16],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[2.16,0],[0,0],[0,-7.92]],"v":[[19.552,14.295],[19.118,14.295],[11.732,12.486],[11.732,12.434],[10.274,10.759],[11.732,-39.149],[-11.732,-39.149],[-16.946,10.385],[-9.686,9.589],[-11.732,12.479],[-11.732,12.486],[-19.119,14.295],[-19.553,14.295],[-33.891,28.635],[-33.891,37.759],[-29.981,41.669],[-11.732,41.669],[-7.821,41.669],[-3.233,41.669],[3.233,41.669],[10.428,41.669],[11.732,41.669],[29.981,41.669],[33.891,37.759],[33.891,28.635]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.117647059262,0.639215707779,0.78823530674,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":187,"op":303,"st":187,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"31","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":216,"s":[0]},{"t":239.30859375,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":213,"s":[598.704,205.652,0],"to":[0,36.667,0],"ti":[0,-36.667,0]},{"t":288.310546875,"s":[598.704,425.652,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.055,0.318],[2.262,0.532],[0,0],[0,0],[0,0],[0.648,-0.583],[0,0],[0,0],[0,0],[-0.116,2.561],[0,0],[0,0],[0,0.542],[0,0],[0,0],[-3.659,4.022],[9.396,1.41],[7.779,-0.132],[4.35,-2.264],[0,0],[-0.016,-3.836],[0,0],[0,0],[0,0],[0,0],[-0.484,-0.242],[0,0],[0,0],[-0.016,-0.158],[-1.923,-1.442],[0,0],[0,0],[0,0],[0.484,-0.726],[0,0],[0,0],[0,0],[0,-2.655],[0,0],[-0.892,-0.484],[-0.494,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.58],[0,0]],"o":[[-0.384,-2.229],[0,0],[0,0],[0,0],[-0.484,-0.726],[0,0],[0,0],[0,0],[2.051,-1.538],[0,0],[0,0],[0.484,-0.242],[0,0],[0,0],[0,0],[0,0],[-2.072,-2.712],[-4.472,0.076],[0,0],[-7.023,5.186],[0.006,1.387],[2.86,2.86],[0,0],[0,0],[0,0.542],[0,0],[0,0],[0.007,0.16],[0.241,2.377],[0,0],[0,0],[0,0],[-0.648,-0.583],[0,0],[0,0],[0,0],[-2.584,0.608],[0,0],[0,1.086],[0.405,0.22],[0,0],[0,0],[0,0],[0,0],[0,0],[1.58,0],[0,0],[0,-0.331]],"v":[[37.1,26.44],[32.773,21.846],[16.747,18.075],[17.162,17.164],[15.219,14.249],[13.072,13.979],[12.871,14.16],[12.871,8.94],[13.922,8.152],[17.345,1.677],[17.484,-1.374],[18.689,-1.977],[19.48,-3.256],[19.48,-7.843],[19.927,-7.148],[22.787,-17.159],[14.312,-36.012],[0,-41.471],[-17.221,-37.777],[-15.106,-36.332],[-23.014,-19.401],[-22.882,-17.159],[-20.022,-7.148],[-19.48,-7.691],[-19.48,-2.77],[-18.689,-1.491],[-17.461,-0.877],[-17.345,1.677],[-17.31,2.155],[-13.922,8.152],[-12.871,8.941],[-12.871,14.16],[-13.072,13.979],[-15.218,14.249],[-17.161,17.164],[-16.747,18.076],[-32.773,21.846],[-37.183,27.415],[-37.183,38.616],[-35.686,41.131],[-34.323,41.476],[-24.312,41.476],[-24.312,41.476],[24.312,41.476],[24.312,41.476],[34.323,41.476],[37.183,38.616],[37.183,27.415]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.407843142748,0.721568644047,0.701960802078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":187,"op":303,"st":187,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"coin 7","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":248,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.157],"y":[0]},"t":279,"s":[100]},{"t":301,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":246,"s":[595.56,646.965,0],"to":[0,0,0],"ti":[0,0,0]},{"t":290,"s":[576.56,894.965,0]}],"ix":2,"l":2},"a":{"a":0,"k":[512.56,829.965,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-12.614],[19.252,0],[6.378,7.042],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,19.253],[-10.243,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[10.029,6.093]],"v":[[30.349,-2.537],[-4.505,32.293],[-30.349,20.817],[-25.986,15.554],[-10.408,-3.272],[-7.374,-6.947],[-5.738,-8.915],[-0.047,-15.791],[9.247,-27.029],[13.609,-32.293]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.886274516582,0.886274516582,0.886274516582,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[517.053,832.502],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":1,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,1.583],[1.809,0.716]],"o":[[1.96,-0.415],[0,-1.772],[0,0]],"v":[[2.337,8.858],[5.428,5.804],[2.337,2.375]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-1.696,-0.678],[0,0],[0,-1.433]],"o":[[0,0],[-1.772,0.302],[0,1.658]],"v":[[-0.98,-3.317],[-0.98,-9.235],[-3.845,-6.596]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0.038,-5.165],[4.787,-0.566],[0,0],[0,0],[0,0],[2.412,2.224],[0,0],[-2.487,-0.377],[0,0],[0,5.013],[-4.749,0.528],[0,0],[0,0],[0,0],[-2.073,-1.395],[0,0],[1.734,0.301]],"o":[[3.845,1.168],[0,4.183],[0,0],[0,0],[0,0],[-3.618,-0.301],[0,0],[2.261,2. - client/src/resource/constants.js (55 bytes)
const url='https://localhost:5000'; export default url;
- client/src/sendmessageform.css (1378 bytes)
/* App.css */ body { background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); background-size: 400% 400%; animation: backgroundMove 15s ease infinite; } .custom-form-container { padding: 40px; background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */ border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); width: 100%; max-width: 500px; } .custom-form-container { padding: 40px; border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); width: 100%; max-width: 500px; } .custom-text-field .MuiOutlinedInput-root { background: #f5f7fa; border-radius: 5px; } .custom-text-field .MuiInputLabel-root { color: #6c757d; } .custom-send-button { background-color: #007bff; color: white; padding: 10px 15px; border-radius: 8px; border: 0; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; } .custom-send-button:hover, .custom-send-button:focus { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5); } /* Responsive adjustments */ @media (max-width: 768px) { .custom-form-container { margin: 20px; padding: 20px; } } - client/src/sendmessageform.js (7353 bytes)
import React, { useState } from 'react'; import 'bootstrap/dist/css/bootstrap.min.css'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; import { Container, Form } from 'react-bootstrap'; import TextField from '@mui/material/TextField'; import MenuItem from '@mui/material/MenuItem'; import SendIcon from '@mui/icons-material/Send'; import './sendmessageform.css'; // Assuming your custom styles are here import url from './resource/constants'; import { styled } from '@mui/system'; const StyledDialog = styled(Dialog)(({ theme }) => ({ '& .MuiDialog-paper': { backgroundColor: '#f0f0f0', color: '#333', borderRadius: '8px', }, '& .MuiDialogTitle-root': { borderBottom: '1px solid #ccc', marginBottom: '16px', }, '& .MuiDialogContent-root': { padding: theme.spacing(2), }, '& .MuiDialogActions-root': { padding: theme.spacing(1), borderTop: '1px solid #ccc', }, })); function App() { const [message, setMessage] = useState(''); const [campaignName, setCampaignName] = useState(''); const [campaignDescription, setCampaignDescription] = useState(''); const [selectedState, setSelectedState] = useState(''); const [selectedCity, setSelectedCity] = useState(''); const [greeting, setGreeting] = useState(''); const [popupOpen, setPopupOpen] = useState(false); // const [popupOpen, setPopupOpen] = useState(false); // const [popupMessage, setPopupMessage] = useState(''); const handlePopupOpen = () => { setPopupOpen(true); }; // Function to close the success popup const handlePopupClose = () => { setPopupOpen(false); }; // Sample states and cities for demonstration const states = [ { value: 'co', label: 'co' }, { value: 'CA', label: 'California' }, { value: 'TX', label: 'Texas' }, { value: 'FL', label: 'Florida' }, { value: 'IL', label: 'Illinois' }, ]; const cities = { NY: ['New York City', 'Buffalo', 'Rochester'], CA: ['Los Angeles', 'San Francisco', 'San Diego'], co: ['Westminster'], FL: ['Miami', 'Orlando', 'Tampa'], IL: ['Chicago', 'Springfield', 'Peoria'], }; const handleSubmit = async (e) => { e.preventDefault(); // Preparing the data to be sent to the backend const payload = { Cmessage: message, // Message text Greeting: greeting, campaignName: campaignName, // Campaign name campaignDescription: campaignDescription, // Campaign description state: selectedState, // Selected state cities: selectedCity ? [selectedCity] : [], // Selected city (assuming single selection, adjust if multiple) }; // Sending the prepared data to the backend const response = await fetch(`https://localhost:5000/api/send-bulk-sms`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }); if (response.ok) { console.log('Request successful'); handlePopupOpen(); } else { console.error('Request failed'); } // if (response.status === 200) { // // If response status code is 200 // setPopupMessage('Your messages have been sent successfully.'); // handlePopupOpen(); // } else { // // For any other response status // setPopupMessage('An error occurred. Your messages could not be sent.'); // handlePopupOpen(); // } }; return ( <Container className="d-flex justify-content-center align-items-center" style={{ minHeight: "100vh" }}> <div className="custom-form-container"> <Form onSubmit={handleSubmit}> {/* Campaign Name */} <TextField className="custom-text-field" label="Campaign Name" variant="outlined" fullWidth margin="normal" value={campaignName} onChange={(e) => setCampaignName(e.target.value)} required /> {/* Campaign Description */} <TextField className="custom-text-field" label="Campaign Description" variant="outlined" fullWidth margin="normal" multiline rows={4} value={campaignDescription} onChange={(e) => setCampaignDescription(e.target.value)} required /> {/* State Dropdown */} <TextField select className="custom-text-field" label="State" variant="outlined" fullWidth margin="normal" value={selectedState} onChange={(e) => { setSelectedState(e.target.value); setSelectedCity(''); // Reset city selection when state changes }} required > {states.map((option) => ( <MenuItem key={option.value} value={option.value}> {option.label} </MenuItem> ))} </TextField> {/* City Dropdown */} <TextField select className="custom-text-field" label="City" variant="outlined" fullWidth margin="normal" value={selectedCity} onChange={(e) => setSelectedCity(e.target.value)} disabled={!selectedState} required > {selectedState && cities[selectedState]?.map((city) => ( <MenuItem key={city} value={city}> {city} </MenuItem> ))} </TextField> {/* Existing Fields */} <TextField className="custom-text-field" label="Greeting" variant="outlined" fullWidth margin="normal" multiline rows={4} value={greeting} onChange={(e) => setGreeting(e.target.value)} required /> <TextField className="custom-text-field" label="Message" variant="outlined" fullWidth margin="normal" multiline rows={4} value={message} onChange={(e) => setMessage(e.target.value)} required /> <button className="custom-send-button" > Send Messages <SendIcon /> </button> </Form> </div> <StyledDialog open={popupOpen} onClose={handlePopupClose} aria-labelledby="alert-dialog-title" aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title">{"Success!"}</DialogTitle> <DialogContent> <DialogContentText id="alert-dialog-description"> Campaign has been created successfully. </DialogContentText> </DialogContent> <DialogActions> <Button onClick={handlePopupClose}>Close</Button> </DialogActions> </StyledDialog> </Container> ); } export default App; - client/src/setupTests.js (241 bytes)
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom';
- INSTRUCTIONS.md (117 bytes)
### Quickstart ```bash git clone https://github.com/TMTanmay1/Bulk_sms.git cd Bulk_sms npm install npm run build ```
- README.md (437 bytes)
**Configuration** Before running the application, you need to set up your environment variables. Create a .env file in the root directory of your project and add the following variables with your credentials: TWILIO_AUTH_TOKEN=your_twilio_auth_token_here TWILIO_PHONE_NUMBERS=your_twilio_phone_number_here DB_HOST=localhost DB_USER=your_database_username_here DB_PASS=your_database_password_here DB_NAME=your_database_name_here
- server/database.js (1909 bytes)
const mysql = require('mysql2'); require('dotenv').config(); // Create a connection using environment variables from your .env file const connection = mysql.createConnection({ host: process.env.DB_HOST, user: process.env.DB_USER, password: process.env.DB_PASS, database: process.env.DB_NAME }); const pool = mysql.createPool({ host: process.env.DB_HOST, user: process.env.DB_USER, password: process.env.DB_PASS, database: process.env.DB_NAME, waitForConnections: true, connectionLimit: 10, queueLimit: 0 }); // const createTableSQL = ` // CREATE TABLE messages ( // campaignID INT, // agentID INT, // sendDateTime DATETIME, // status VARCHAR(255), // PRIMARY KEY (campaignID, agentID) // );`; // const createAgentsTableSQL = ` // CREATE TABLE agents ( // Name VARCHAR(255), // Company VARCHAR(255), // AgentLicense VARCHAR(255), // Phone VARCHAR(20), // Reviews INT, // Picture TEXT, // Link TEXT, // City VARCHAR(255), // State VARCHAR(255) // );`; // const createTableSQL = ` // CREATE TABLE campaigns ( // id INT AUTO_INCREMENT PRIMARY KEY, // title VARCHAR(255), // description TEXT, // startDate DATE, // endDate DATE, // message TEXT, // city VARCHAR(255), // state VARCHAR(255), // count VARCHAR(255) // );` connection.connect(err => { if (err) { console.error('An error occurred while connecting to the DB:', err); return; } console.log('Successfully connected to the database.'); } ); // connection.query(createTableSQL, (err, results) => { // if (err) { // console.error('An error occurred while creating the table:', err); // return; // } // console.log('Table created successfully:', results); // }); const promisePool = pool.promise(); module.exports = { query: async (sql, params) => { return promisePool.query(sql, params); } }; - server/package.json (484 bytes)
{ "name": "sms-sender", "version": "1.0.0", "description": "", "main": "server.js", "scripts": { "start": "node server.js", "dev": "nodemon server.js", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", "mongoose": "^8.2.3", "mysql2": "^3.9.3", "nodemon": "^3.1.0", "twilio": "^5.0.1" } } - server/server.js (7147 bytes)
const express = require("express"); const app = express(); const twilio = require("twilio"); const db = require("./database"); const cors = require("cors"); const bodyParser = require('body-parser'); const PORT = process.env.PORT || 5000; require("dotenv").config(); const twilioClient = twilio( process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN ); app.use(bodyParser.urlencoded({ extended: true })); // Parse JSON bodies (as sent by API clients) app.use(bodyParser.json()); app.use(express.json()); // Middleware to parse JSON bodies app.use(cors()); // Middleware to enable CORS // Ensure TWILIO_PHONE_NUMBERS is a comma-separated list of numbers in .env const twilioPhoneNumbers = process.env.TWILIO_PHONE_NUMBERS.split(","); let phoneNumberIndex = 0; // Index to track the current Twilio number being used app.post("/api/send-bulk-sms", async (req, res) => { const { Cmessage, campaignName, campaignDescription, state, cities, Greeting } = req.body; const startDate = new Date(); const query = ` SELECT Phone , Name , ID FROM agents WHERE State = ? AND City IN (?); `; const [rows, fields] = await db.query(query, [state, cities]); const count = rows.length; const campaignQuery = ` INSERT INTO campaigns (title, description, startDate, message, state, city , count) VALUES (?, ?, ?, ?, ?, ? , ?); `; const [campaignResult] = await db.query(campaignQuery, [ campaignName, campaignDescription, startDate, Cmessage, state, cities, count ]); const campaignId = campaignResult.insertId; const delayPerNumber = 1000; // Assuming 1 message per second per Twilio number // console.log(rows); // const numbers = rows.map((row) => row.Phone); // const names = rows.map((row) => row.Name); // const IDs = rows.map((row) => row.ID); const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // Enhanced sendSMS function to retry with the next "from" number upon failure const sendSMS = async (to, Cmessage, name, agentID) => { const fromIndex = phoneNumberIndex % twilioPhoneNumbers.length; const fromNumber = twilioPhoneNumbers[fromIndex]; try { console.log(Cmessage); const message = await twilioClient.messages.create({ to, from: fromNumber, body: Greeting +" " + name + " " + Cmessage }); const insertQuery = ` INSERT INTO messages ( campaignID, agentID, sendDateTime , twilioSid) VALUES (?, ?, ?, ?); `; await db.query(insertQuery, [ campaignId, agentID, message.dateCreated, message.sid, ]); console.log(message); console.log( `Message sent from ${fromNumber} to ${to} with SID: ${message.sid}` ); return true; // Return true on successful send } catch (error) { console.error( `Failed to send message from ${fromNumber} to ${to}. Error: ${error.message}` ); return false; } }; const contacts = rows.map((row) => ({ id: row.ID, name: row.Name, number: row.Phone, })); console.log(contacts); for (const contact of contacts) { const isSuccess = await sendSMS( contact.number, Cmessage, contact.name, contact.id ); if (!isSuccess) { console.log(`Failed to send message to ${contact.number}. Skipping...`); continue; // Skip the rest of this loop iteration and move to the next contact } phoneNumberIndex = (phoneNumberIndex + 1) % twilioPhoneNumbers.length; if (phoneNumberIndex === 0) { await wait(delayPerNumber); } } res.json({ message: "Messages are being sent" }); }); app.get("/api/twilio/update-status", async (req, res) => { try { const sql = `SELECT twilioSid FROM messages `; const [results] = await db.query(sql); if (results.length === 0) { return res.status(404).send('No records found'); } const messageSid = results.map(row => row.twilioSid); const messageStatuses = await Promise.all( messageSid.map(async (sid) => { const message = await twilioClient.messages(sid).fetch(); const query = `UPDATE messages SET status = ? WHERE twilioSid = ?`; await db.query(query, [message.status, sid]); return { sid: sid, status: message.status }; }) ); res.status(200).json({ message: 'Successfully fetched message statuses', data: messageStatuses }); } catch (err) { console.error("An error occurred:", err); res.status(500).send('Error querying the database'); } }); app.get("/api/getallmessages/:pageno?", async (req, res) => { try { // Use the path parameter 'pageno', default to 1 if not provided const pageno = parseInt(req.params.pageno) || 1; const limit = 10; // Set a fixed limit or you could also accept this from query params const offset = (pageno - 1) * limit; const sql = `SELECT * FROM messages LIMIT ? OFFSET ?`; // Execute the query with the calculated limit and offset const [results] = await db.query(sql, [limit, offset]); // Fetch the total count of messages for pagination information const [totalResults] = await db.query("SELECT COUNT(*) AS total FROM messages"); const total = totalResults[0].total; const totalPages = Math.ceil(total / limit); // Send paginated results along with total pages and the current page res.json({ data: results, total, totalPages, currentPage: pageno }); } catch (error) { console.error("Error fetching data:", error); res.status(500).send("An error occurred while fetching messages."); } }); app.get('/api/', (req, res) => { // Construct a custom message const customMessage = "This is a custom message."; // Send the custom message as a response res.status(200).send({ message: customMessage , twilioPhoneNumbers: twilioPhoneNumbers , db: db }); }); app.get("/api/campaigns/:pageno", async (req, res) => { try { // Using 'pageno' as a path parameter, default to 1 if not provided const pageno = parseInt(req.params.pageno) || 1; const limit = parseInt(req.query.limit) || 10; // 'limit' can still be a query parameter const offset = (pageno - 1) * limit; const sql = "SELECT id, title, description, startDate, endDate, message, city, state, count FROM campaigns LIMIT ? OFFSET ?"; console.log(sql); // Using connection pool to execute query swith pagination const [results] = await db.query(sql, [limit, offset]); // Optional: Fetch total count of campaigns for pagination info const [totalResults] = await db.query("SELECT COUNT(*) AS total FROM campaigns"); const total = totalResults[0].total; const totalPages = Math.ceil(total / limit); // Sending paginated results along with total pages and current page res.json({ data: results, total, totalPages, currentPage: pageno }); } catch (error) { console.error("Error fetching data:", error); res.status(500).send("An error occurred while fetching campaigns."); } }); app.listen(PORT, () => console.log(`Server running on port ${PORT}`));