Century is a small app that demonstrates contact functionality. The main function of this app is to search for branch company information and provide contact functionality through Google Maps integration.
- Branch company information search
- Contact functionality through Google Maps
- React.js
- TypeScript
- Tailwind CSS
- Node.js
- Express
- MongoDB
- Vite
git clone https://github.com/padrone1225/test.git
cd test/frontend
npm install
cd test
npm install
npm run server
npm run frontend
npm run dev
cd frontend
npx tailwindcss -i ./src/App.css -o ./src/styles/output.css --watch
npm run render-postbuild
npm run render-postbuild
npm start
npm run render-postbuild
npm start --production=true
Access the application at http://localhost:4000
In order to check the validity of the contact information, a server-side middleware was implemented using regular expressions (RegEx) to validate the values. The following patterns were used:
- Name:
/^([A-Z][a-z]*)(\s[A-Z][a-z]*){0,2}$/
- Email:
/^[a-z][a-z0-9.]*@[a-z]+\.[a-z]+$/
- Phone Number:
/^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$/