PalitasPR is a service requests - promotions platform born from the need of a fast and reliable services system. We all know that finding jobs/services online as a contractor or as a person who needs to contract a servicer it's a difficult task. Between almost-dead platforms and the congestion that we can find in social media, everyday, searching or promoting a service gets more difficult. Our team worked with multiple technologies to bring you the best user experience.
All of this tools and technologies together, make our app efficient, functional and fast.
npm create vite@latest <project-name>
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
npm i -D daisyui@latest
module.exports = {
//...
plugins: [
require('daisyui'),
],
}
npm run dev # runs the project in development mode
While SQLAlchemy encourages using relationships defined in models for data retrieval, we occasionally opt for custom SQL queries executed directly from the database session. This approach allows us to optimize performance for specific queries that may be more efficient when tailored directly to our database schema and requirements.
Database Operations are managed through the db folder, organized based on class models and standard CRUD operations. We use SQLAlchemy as our ORM tool to map Python objects to PostgreSQL tables. While ORM relationships are used for typical data retrieval, custom SQL queries are employed for performance optimization in specific scenarios.
DB Operations Classes The following classes manage various aspects of database interactions:
These classes encapsulate the logic for interacting with the database, ensuring a clean separation of concerns and making the codebase easier to maintain and extend.
This hybrid approach ensures flexibility in managing our database interactions, balancing the convenience of ORM with the performance benefits of custom SQL queries where necessary.
Folders & Files | Content |
---|---|
api_blueprints | Routes and blueprints for main flask app.py |
api_documentation | Routes documentation |
db | Db operation files based on class model and regular C.R.U.D for database |
email_template | Template for email visual structure sent on confimation email |
static | Files to serve from the frontend build via flask |
app.py | Main Flask Aplication |
aws_bucket.py | S3 bucket related functions |
base_model.py | Base model for all models |
models.py | All models represeting tables on database |
console.py | Testing console for the app |
emails.py | Functions related to emails |
The core of our infrastructure is managed by an Elastic Load Balancer (ELB), which distributes incoming traffic across multiple EC2 instances, but in the case of this demo project only to one. These instances are configured with a Linux server environment running Gunicorn and Nginx. Gunicorn serves as the WSGI server, handling Python web application requests the main app.py
, while Nginx acts as a reverse proxy server, enhancing performance by caching and serving static content.
Our ELB is configured to target a group of EC2 instances, where listeners on ports 80 (HTTP) and 443 (HTTPS) are redirected to our palitaspr.com EC2 instance.
AWS Instance | Usage |
---|---|
RDS | Hosting Postgres Database |
EC2 | Virtual machine using linux with gunicorn and nginx to run server |
ELB | Load balancer to redirect traffic from http and https into EC2 intance |
S3 | Bucket for handling pictures of the app and its users |
Route-53 | Used to obtain domain 'palitaspr.com' |
ACM | Certification(SSL) from ACM to use https safely in our load balancer' |
Members | Roles | Links |
---|---|---|
Antonio de Jesus | Database Manager | |
Jonathan Perez | Frontend-Mobile Developer | |
Livan Hernandez | Frontend Developer | |
Louis Toro | Backend Developer | |
Luis Santiago | Lead Developer |