docs: AI repo summary gitjet/gitjet.ru@448c71f5
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant U as User
|
||||
participant F as Frontend
|
||||
participant B as Backend
|
||||
participant D as Database
|
||||
|
||||
U->>F: Search repositories (keyword)
|
||||
F->>B: Send request to /search endpoint
|
||||
B->>D: Query database for repositories
|
||||
D-->B: Return results
|
||||
B->>F: Send response to frontend
|
||||
F->>U: Display search results
|
||||
|
||||
U->>F: View repository details (id)
|
||||
F->>B: Send request to /repository/{id} endpoint
|
||||
B->>D: Query database for repository details
|
||||
D-->B: Return results
|
||||
B->>F: Send response to frontend
|
||||
F->>U: Display repository details
|
||||
|
||||
U->>F: View user profile (username)
|
||||
F->>B: Send request to /user/{username} endpoint
|
||||
B->>D: Query database for user profile
|
||||
D-->B: Return results
|
||||
B->>F: Send response to frontend
|
||||
F->>U: Display user profile
|
||||
```
|
||||
|
||||
## API endpoints
|
||||
|
||||
The following are the REST API endpoints used in the GitJet application:
|
||||
|
||||
- `/search`: Triggered by a search query, returns a list of repositories that match the query.
|
||||
- `/repository/{id}`: Triggered by a repository ID, returns detailed information about the repository.
|
||||
- `/user/{username}`: Triggered by a username, returns detailed information about the user's profile.
|
||||
|
||||
## Deployment
|
||||
|
||||
The GitJet application is deployed using Docker and Kubernetes on Google Cloud Platform (GCP). The application consists of two main containers:
|
||||
|
||||
1. **Frontend:** This container runs a Node.js server that serves the static files for the frontend.
|
||||
2. **Backend:** this container runs a Python Flask server that communicates with a PostgreSQL database to store and retrieve data.
|
||||
|
||||
The application is deployed using Kubernetes, which manages the deployment of containers on GCP's virtual machines. The application uses environment variables to configure its behavior, including the URL of the database and the port on which it should listen for requests.
|
||||
|
||||
## Infrastructure dependencies
|
||||
|
||||
- **Database:** PostgreSQL
|
||||
- **Web server:** Nginx
|
||||
- **Container registry:** Google Container Registry (GCR)
|
||||
- **Cloud storage:** Google Cloud Storage (GCS)
|
||||
- **CI/CD pipeline:** GitHub Actions
|
||||
- **Monitoring and logging:** Stackdriver Monitoring and Logging
|
||||
|
||||
## Runbook hooks
|
||||
|
||||
The following are some of the runbook hooks used in the GitJet application:
|
||||
|
||||
1. **Database migrations:** The application uses Alembic for database migrations. When a new migration is applied, it triggers a hook that sends an email notification to the team.
|
||||
2. **Health checks:** The application includes health checks using Flask-MonitoringDashboard. When a health check fails, it triggers a hook that sends an alert to the team.
|
||||
|
||||
## Next actions
|
||||
|
||||
The following are some of the next actions that need to be taken in order to improve the GitJet application:
|
||||
|
||||
1. **Improve performance:** The application needs to be optimized for better performance. This can include optimizing database queries, improving caching, and using more efficient algorithms.
|
||||
2. **Add user authentication:** The application should have user authentication to allow users to create accounts, log in, and access their profiles.
|
||||
3. **Improve security:** The application needs to be secured against common web vulnerabilities such as SQL injection, cross-site scripting (XSS), and command injection.
|
||||
|
||||
---
|
||||
|
||||
[end of technical excerpt]
|
||||
Reference in New Issue
Block a user