Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Generate JWT Keys for Testing
run: |
mkdir -p src/main/resources
openssl genrsa -out privateKey.pem 2048
openssl pkcs8 -topk8 -inform PEM -outform PEM -in privateKey.pem -out src/main/resources/privateKey.pk8 -nocrypt
openssl rsa -in privateKey.pem -pubout -outform PEM -out src/main/resources/publicKey.pem
rm privateKey.pem

- name: Build and Test
run: ./mvnw clean verify

Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
.DS_Store
.frontend/agents/
.frontend/agents/
target/
*.class
*.log
.idea/
.vscode/
*.swp
*.pem
*.pk8
node_modules/
dist/
.env
1 change: 0 additions & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-jwt-build</artifactId>
<version>3.35.0</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ quarkus.flyway.migrate-at-start=true
quarkus.mailer.mock=false

# -------------> CONFIGURAÇÕES JWT <-------------
smallrye.jwt.sign.key.location=classpath:privateKey.pk8
mp.jwt.verify.publickey.location=classpath:publicKey.pem
smallrye.jwt.sign.key.location=${JWT_PRIVATE_KEY_LOCATION:classpath:privateKey.pk8}
mp.jwt.verify.publickey.location=${JWT_PUBLIC_KEY_LOCATION:classpath:publicKey.pem}
mp.jwt.verify.issuer=https://flima.dev

# -------------> CONFIGURAÇÕES Kafka <-------------
Expand Down
28 changes: 0 additions & 28 deletions backend/src/main/resources/privateKey.pem

This file was deleted.

28 changes: 0 additions & 28 deletions backend/src/main/resources/privateKey.pk8

This file was deleted.

9 changes: 0 additions & 9 deletions backend/src/main/resources/publicKey.pem

This file was deleted.

2 changes: 1 addition & 1 deletion backend/src/test/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ quarkus.flyway.migrate-at-start=true
# Mock de Mailer para Testes
quarkus.mailer.mock=true

# JWT Test Config
# JWT Test Config (Uses generated RSA keys)
mp.jwt.verify.issuer=https://flima.dev

# Kafka Resilience Config
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ server {
try_files $uri $uri/ /index.html;
}

location /api {
proxy_pass http://flima-backend-service:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

# Cache static assets
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ {
expires 6M;
Expand Down
32 changes: 30 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@reduxjs/toolkit": "^2.11.2",
"jwt-decode": "^4.0.0",
"prop-types": "^15.8.1",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"react-redux": "^9.2.0"
Expand Down
7 changes: 3 additions & 4 deletions frontend/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sonar.projectKey=devflima
sonar.projectKey=devflima_flima.dev_frontend
sonar.organization=devflima
sonar.sources=src
sonar.tests=src
sonar.test.inclusions=src/**/*.test.js,src/**/*.test.jsx
sonar.tests=src/test
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.exclusions=node_modules/**,dist/**
sonar.exclusions=src/test/**, node_modules/**, dist/**
File renamed without changes
14 changes: 7 additions & 7 deletions frontend/src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<footer className="w-full py-8 bg-slate-950 dark:bg-slate-950 border-t border-slate-800 mt-auto">
<div className="flex flex-col md:flex-row justify-between items-center px-12 max-w-screen-2xl mx-auto gap-4">
<div className="font-mono text-[10px] uppercase tracking-widest text-[#00FF41]">
&copy; {new Date().getFullYear()} // ALL RIGHTS RESERVED
&copy; {new Date().getFullYear()} {'// ALL RIGHTS RESERVED'}
</div>
<div className="flex gap-6 font-mono text-[10px] uppercase tracking-widest text-slate-600">
<a className="hover:text-white transition-opacity duration-300 relative group" href="#">
<a className="hover:text-white transition-opacity duration-300 relative group" href="https://github.com/devflima" target="_blank" rel="noopener noreferrer">
GitHub
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">coord: [45.1, -12.3]</span>
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">git: [devflima]</span>

Check warning on line 11 in frontend/src/components/Footer.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Ambiguous spacing before next element span

See more on https://sonarcloud.io/project/issues?id=devflima_flima.dev_frontend&issues=AZ3_YwqyXKxu2m4ViCnn&open=AZ3_YwqyXKxu2m4ViCnn&pullRequest=17
</a>
<a className="hover:text-white transition-opacity duration-300 relative group" href="#">
<a className="hover:text-white transition-opacity duration-300 relative group" href="https://www.linkedin.com/in/felipe-lima-19873a14b/" target="_blank" rel="noopener noreferrer">
LinkedIn
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">coord: [88.2, 14.7]</span>
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">in: [felipe-lima]</span>

Check warning on line 15 in frontend/src/components/Footer.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Ambiguous spacing before next element span

See more on https://sonarcloud.io/project/issues?id=devflima_flima.dev_frontend&issues=AZ3_YwqyXKxu2m4ViCno&open=AZ3_YwqyXKxu2m4ViCno&pullRequest=17
</a>
<a className="hover:text-white transition-opacity duration-300 relative group" href="#">
<a className="hover:text-white transition-opacity duration-300 relative group" href="mailto:contato@flima.dev">
Email
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">coord: [0.0, 0.0]</span>
<span className="absolute -top-6 left-0 hidden group-hover:block bg-surface border border-outline-variant px-2 py-1 text-primary-container">mail: [contato]</span>

Check warning on line 19 in frontend/src/components/Footer.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Ambiguous spacing before next element span

See more on https://sonarcloud.io/project/issues?id=devflima_flima.dev_frontend&issues=AZ3_YwqyXKxu2m4ViCnp&open=AZ3_YwqyXKxu2m4ViCnp&pullRequest=17
</a>
<span className="hover:text-white transition-opacity duration-300 border-l border-slate-800 pl-6 flex items-center gap-2">
<div className="w-1.5 h-1.5 rounded-full bg-[#00FF41]"></div>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import Navbar from './Navbar';
import Footer from './Footer';

Expand All @@ -12,3 +13,7 @@ export default function Layout({ children }) {
</div>
);
}

Layout.propTypes = {
children: PropTypes.node.isRequired,
};
5 changes: 4 additions & 1 deletion frontend/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link, useLocation } from 'react-router-dom';
import logo from '../assets/logo.svg';

export default function Navbar() {
const location = useLocation();
Expand All @@ -16,7 +17,9 @@ export default function Navbar() {
<nav className="fixed top-0 w-full z-50 bg-slate-950/80 dark:bg-slate-950/80 backdrop-blur-xl border-b border-slate-800 flat no shadows">
<div className="flex justify-between items-center px-12 h-16 w-full max-w-[1440px] mx-auto">
<div className="text-xl font-black text-[#00FF41] tracking-widest font-mono">
<img src="../../public/logo.svg" alt="logo" />
<Link to="/">
<img src={logo} alt="logo" className="h-8 w-auto" />
</Link>
</div>
<div className="hidden md:flex gap-8 items-center font-mono uppercase tracking-tighter text-sm">
{links.map((link) => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const API_URL = import.meta.env.VITE_API_URL !== undefined
export const API_URL = import.meta.env.VITE_API_URL
? import.meta.env.VITE_API_URL
: 'http://localhost:8080';
: (import.meta.env.MODE === 'test' ? 'http://localhost:8080' : '');

Check warning on line 3 in frontend/src/config.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=devflima_flima.dev_frontend&issues=AZ3_Ywq8XKxu2m4ViCnq&open=AZ3_Ywq8XKxu2m4ViCnq&pullRequest=17
Loading
Loading