💻 Programmierung & Entwicklung

Fullstack Software Developer

📁 Programmierung & Entwicklung 👤 Beigetragen von @yusuffgur 🗓️ Aktualisiert
Der Prompt
I want you to act as a software developer. I will provide some specific information about a web app requirements, and it will be your job to come up with an architecture and code for developing secure app with Golang and Angular. My first request is 'I want a system that allow users to register and save their vehicle information according to their roles and there will be admin, user and company roles. I want the system to use JWT for security'

Beispiel-Ausgaben

So antworten ChatGPT, Claude und Gemini typischerweise auf diesen Prompt:

🚀 ChatGPT

I'll help you design a secure web application with Golang backend and Angular frontend. For the architecture, I recommend: Backend - Golang with Gin framework, PostgreSQL database with three tables (users, vehicles, roles), JWT middleware for authentication. Frontend - Angular 15+ with route guards and role-based components. The user registration flow will hash passwords with bcrypt, assign roles (admin/user/company), and return JWT tokens with role claims. Each vehicle entry will be associated with a user_id and have role-based access controls to ensure users can only view/edit their own vehicles while admins have full access.

✨ Claude

For this system, I'd suggest a layered architecture: a Golang REST API using the Gin framework with a PostgreSQL database, and an Angular SPA for the frontend. The core entities would be User (with role field), Vehicle (with foreign key to User), and potentially a separate Companies table if companies need distinct attributes. For JWT security, implement middleware that validates tokens on protected routes and checks role claims before allowing operations. One consideration: you'll want to clarify whether 'company' users can see all vehicles under their company or just their own—this affects your access control logic significantly.

💎 Gemini

Here's a high-level architecture: Backend uses Golang with Gin/Echo framework, GORM for database ORM (PostgreSQL), and jwt-go library for token generation. Database schema includes users table (id, email, password_hash, role), vehicles table (id, user_id, make, model, year, vin), and a roles enum (admin, user, company). Frontend Angular app uses HttpInterceptor to attach JWT tokens, guards for route protection, and separate modules per role. Authentication flow: POST /register creates user with bcrypt-hashed password, POST /login returns JWT with role claim, middleware validates JWT on protected endpoints like GET/POST /vehicles with role-based authorization checks.

So nutzt du diesen Prompt

Kopiere den Prompt oben oder klicke einen "Öffnen in"-Button um ihn direkt in deiner bevorzugten KI zu starten. Du kannst den Text dann an deinen Anwendungsfall anpassen — z.B. Platzhalter wie [dein Thema] durch echten Kontext ersetzen.

Welches KI-Modell funktioniert am besten

Claude Opus 4 und Sonnet 4.6 performen bei Coding-Aufgaben meist besser als ChatGPT und Gemini — stärkeres Reasoning, besser mit langem Kontext (ganze Dateien, Multi-File-Projekte), und ehrlicher über Unsicherheit. ChatGPT ist schneller für Quick-Snippets; Gemini ist am besten wenn Code mit Screenshots oder visuellem Kontext zu tun hat.

Diesen Prompt anpassen

Tausche die im Prompt erwähnte Sprache (Python, JavaScript, etc.) gegen deinen Stack. Für Debugging oder Code-Review fügst du deinen echten Code direkt nach dem Prompt ein. Bei Generierungs-Aufgaben spezifiziere das Framework (React, Vue, Django, FastAPI) und Einschränkungen (max. Zeilen, keine externen Libraries, muss async sein).

Typische Anwendungsfälle

  • Production-Code mit strikten Style-Vorgaben schreiben
  • Pull Requests reviewen und Bugs vor dem Merge finden
  • Zwischen Sprachen konvertieren (Python → TypeScript z.B.)
  • Unit-Tests für bestehende Funktionen generieren
  • Unbekannte Codebases für neue Team-Mitglieder erklären

Variationen

Passe den Tonfall an (lockerer, technischer), ändere das Ausgabeformat (Aufzählungen vs. Absätze) oder füge Einschränkungen hinzu (Wortlimits, Zielgruppe).

Verwandte Prompts