All processes are transparent and fully controlled — you see the product’s quality at every stage.
@Service
public class AiDevAssistant {
private final WebClient client = WebClient.create("https://api.openai.com/v1");
public String analyzeCode(String code) {
return client.post()
.uri("/chat/completions")
.header("Authorization", "Bearer YOUR_API_KEY")
.contentType(MediaType.APPLICATION_JSON)
.bodyValue(Map.of(
"model", "olama-4o",
"messages", List.of(Map.of(
"role", "user",
"content", "Analyze this code and find vulnerabilities:\n" + code))
))
.retrieve()
.bodyToMono(String.class)
.block(Duration.ofSeconds(10));
}
}
@GetMapping("/projects/active")
public ResponseEntity<List<ProjectDto>> getActiveProjects() {
List<ProjectDto> projects = projectRepo.findAll().stream()
.filter(p -> p.isActive() && p.lastUpdate().isAfter(Instant.now().minus(Duration.ofDays(30))))
.sorted(Comparator.comparing(ProjectDto::priority).reversed())
.map(p -> new ProjectDto(
p.id(),
p.name(),
p.owner(),
"Active - updated " + Duration.between(p.lastUpdate(), Instant.now()).toDays() + " days back"
))
.limit(10)
.toList();
return ResponseEntity.ok(projects);
}
import { execSync } from "child_process";
console.log("🚀 Starting CI/CD pipeline...");
try {
execSync("git pull origin main", { stdio: "inherit" });
execSync("npm ci", { stdio: "inherit" });
execSync("npm run build", { stdio: "inherit" });
execSync("pm2 restart all", { stdio: "inherit" });
console.log("✅ Deployment completed successfully!");
} catch (error) {
console.error("❌ Deployment failed:", error.message);
process.exit(1);
}