The Project • Target • Technologies • Route
The following tools were used in building the project:
Type | Tools | References |
---|---|---|
IDE - Front end | VS CODE | https://code.visualstudio.com/ |
IDE - Back end | SPRING TOOL SUITE | https://code.visualstudio.com/ |
Design Interface Tool | FIGMA (Prototype - UX/UI) | https://www.figma.com/ |
Programming Language (Front end) | REACT | https://reactjs.org/ |
Programming Language (Front end) | TYPESCRIPT | https://www.typescriptlang.org/ |
Programming Language (Back end) | JAVA | https://dev.java/learn/getting-started-with-java/ |
Java Framework (Back end) | SPRING BOOT | https://spring.io/projects/spring-boot |
Promise based HTTP client - browser & Node.js | AXIOS | https://axios-http.com/ |
Database | SQL | https://graphcms.com/ |
In-memory (Java SQL) Database | H2 DATABASE | https://www.h2database.com/html/main.html |
Communication API | TWILIO | https://www.twilio.com/ |
Tool to build frontend faster | VITE.JS | https://vitejs.dev/ |
API platform for building and using APIs | POSTMAN | https://www.postman.com/ |
Deploy Project | HEROKU CLI | https://www.heroku.com/ |
- Part 1 - Installing tools
- Build the project prototype: https://www.figma.com/file/R7jageEKLtZ2fhA7HvEP8Z/DSMeta?node-id=0%3A1
- Install VS Code (IDE), Spring Tool Suite (IDE)
- Install VS Code extensions: IntelliCode, ESLint, JSX HTML
- Create a Github repository
- Part 2 - Static Front End
- Create a new React project: yarn create vite frontend --template react-ts
- Static layout
- React components
- DatePicker: yarn add react-datepicker@4.8.0 @types/react-datepicker@4.4.2
- React Hook useState
- Part 3 - Back End
- Create a new Spring Boot project at Spring Initializr:
- Spring Web
- Spring Data JPA
- H2 Database
- Spring Security
- Open project at Spring Toll Suite 4 (STS)
- Modify pom.xml:
org.apache.maven.plugins maven-resources-plugin 3.1.0 - Update project: Project (right button) > Maven > Update Project (force update)
- Security settings for Cross-Origin Resource Sharing (CORS) and activation (initaially disabled by default)
- Database
- Modeling: entities and relationships
- Create Sale entity
- Map relational-object (JPA)
- Set conection data with H2 database
- Seed at database
- REST API
- Create repository
- Create service
- Create controller
- API REST first test
- Data listing
- SMS integration
- Twilio - Maven Dependencies
com.twilio.sdk twilio 8.31.1 - Twilio - Environmental variables
twilio.sid=${TWILIO_SID}
twilio.key=${TWILIO_KEY}
twilio.phone.from=${TWILIO_PHONE_FROM}
twilio.phone.to=${TWILIO_PHONE_TO}
- Twilio - Maven Dependencies
- Heroku implementation
- Create app
- Set environmental variables
- TWILIO_SID
- TWILIO_KEY
- TWILIO_PHONE_FROM
- TWILIO_PHONE_TO
- Keyboard:
heroku -v
heroku login
heroku git:remote -a "app-name"
git remote -v
git subtree push --prefix backend heroku main
- Part 4 - Integration and Deployment
- Integrate Front end and Back end
- Requests with axios: yarn add axios@0.27.2
- React Hook useEffect
- Query parameters
- Toast message for confirmation: yarn add react-toastify@9.0.5
- Cloud deployment - Netlify
- Basic deploy
- Base directory: frontend
- Build command: yarn build
- Publish directory: frontend/dist
- Environmental variable: VITE_BACKEND_URL
- Aditional settings
- Site settings -> Domain Management
- Deploys -> Trigger deploy
- Basic deploy