You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the official repository for my personal portfolio, [jaroslav.tech](https://jaroslav.tech). This project is more than just a website; it's a comprehensive demonstration of my capabilities in full-stack web development, showcasing a robust backend built with Python and Django, a clean frontend, and modern, automated DevOps practices.
6
+
Professional portfolio demonstrating Infrastructure & DevOps engineering expertise combined with full-stack development skills. Built with Django, containerized with Docker, and self-hosted on Proxmox with fully automated CI/CD deployment.
The portfolio now includes **DevTracker**, a comprehensive project management system built with Django that demonstrates advanced web development capabilities:
14
+
Portfolio includes **DevTracker**, a comprehensive project management system demonstrating advanced Django development:
11
15
12
16
-**Complex Data Models** with relationships for projects, tasks, time tracking, and categorization
13
17
-**Authentication & Authorization** with separate user and admin interfaces
14
-
-**Time Tracking System** with full CRUD operations for logging work hours
15
-
-**Project Organization** with public/private visibility controls and user separation
16
-
-**Progress Tracking** with visual progress bars and completion metrics
17
-
-**Responsive Design** using Catppuccin theme with light/dark mode support
18
+
-**Time Tracking System** with full CRUD operations
19
+
-**Project Organization** with public/private visibility controls
20
+
-**Progress Tracking** with visual metrics and completion indicators
21
+
-**Responsive Design** using Catppuccin theme with light/dark mode
18
22
19
-
**Access DevTracker:** Available at `/tracker/` with demo projects showcasing real development workflows.
23
+
**Access DevTracker:** Available at `/tracker/` with demo projects.
<imgsrc="assets/thumbnail.jpg"alt="Click to see a short video on Vimeo.com">
33
-
</a>
34
-
35
-
---
36
-
37
29
## ✨ Key Features
38
30
39
-
This project is built with a focus on modern features and best practices to ensure a great user experience and easy maintenance.
40
-
41
-
***Fully Responsive Design:** The user interface is crafted with a mobile-first approach, ensuring a seamless experience across all devices. It uses a combination of CSS Flexbox and Grid along with media queries to adapt flawlessly to any screen size, from small mobile phones to large desktop monitors.
42
-
***Light & Dark Mode:** The application includes a theme switcher that supports both light and dark modes. It automatically detects the user's operating system preference via the `prefers-color-scheme` media query. The user's choice is then saved in their browser's `localStorage`, so their selected theme persists across sessions. This is implemented using CSS variables for easy color management.
43
-
***Internationalization (i18n):** To reach a broader audience, the website is fully bilingual (Czech and English). This is achieved using Django's built-in internationalization framework, including `gettext` for translating strings in both the backend and templates. The language can be switched seamlessly via a UI control that updates the session's language setting.
44
-
***Dynamic Content Management:** To avoid hardcoding content, most of the text and configuration on the site is managed through a customized Django admin panel. This allows for easy updates without touching the codebase. For instance, project descriptions, job titles, and even the "Coming Soon" mode can be toggled with a simple checkbox in the admin.
45
-
***Singleton Pattern for Global Settings:** To manage site-wide settings, the project employs the Singleton design pattern for a specific Django model. This ensures that there is only one row in the database for global configurations (like the "Coming Soon" switch), preventing inconsistencies and providing a single source of truth for the application's state.
46
-
***Clean and Sustainable Code:** The codebase adheres to the PEP 8 style guide and emphasizes readability and maintainability. It follows the "fat models, thin views" philosophy, with clear separation of concerns. Comprehensive comments and a logical project structure make the code easy to navigate and understand for other developers.
47
-
***Automated Deployment with CI/CD:** The entire deployment process is automated using GitHub Actions. Every push to the `main` branch triggers a workflow that builds, tests, and deploys the application to the production server. This ensures that every update is delivered quickly, reliably, and consistently, minimizing the risk of human error.
48
-
***Performance Optimization with Redis Caching:** To enhance performance and reduce database load, the application uses Redis for caching. Expensive queries, such as the project list, are cached to provide a faster user experience. The caching logic is implemented with user-specific keys to ensure data privacy and correctness.
31
+
**Infrastructure & DevOps**
32
+
* Fully automated CI/CD pipeline with GitHub Actions
33
+
* Docker containerization with PostgreSQL and Redis
34
+
* Zero-downtime deployments to production server
35
+
* Self-hosted on Proxmox infrastructure
36
+
* Redis caching for performance optimization
37
+
* Real-time server metrics monitoring (CPU, RAM, disk, uptime)
38
+
39
+
**Full-Stack Development**
40
+
* Django backend with PostgreSQL database
41
+
* Responsive frontend with mobile-first approach
42
+
* Internationalization (i18n) supporting Czech and English
43
+
* Dynamic content management through Django admin
44
+
* Blog system with CKEditor rich text editor
45
+
* Live GitHub API integration for repository stats
46
+
47
+
**SEO & Performance**
48
+
* Comprehensive SEO optimization (meta tags, Open Graph, structured data)
49
+
* XML sitemap with multilingual support (hreflang)
50
+
* Schema.org markup for rich search results
51
+
* Redis caching with user-specific keys
52
+
* Optimized database queries
49
53
50
54
---
51
55
52
56
## 🛠️ Tech Stack
53
57
54
-
The project leverages a modern and robust technology stack to deliver high performance and scalability.
@@ -69,130 +71,68 @@ The project leverages a modern and robust technology stack to deliver high perfo
69
71
70
72
## 📂 Project Structure
71
73
72
-
The project uses a `src` layout for a clean separation between the application code and the project's root-level configuration files (like `docker-compose.yml`).
73
-
74
74
```
75
75
.
76
76
├── .github/ # CI/CD workflows (GitHub Actions)
77
-
├── .gitignore # Files and directories ignored by Git
78
-
├── docker-compose.yml # Docker configuration for services
79
-
├── LICENSE # MIT License
80
-
├── README.md # You are here!
81
-
└── src/ # Main source code directory
82
-
├── core/ # The primary Django application (portfolio)
Copy the example file. The default values are configured for Docker.
114
-
```bash
115
-
cp .env.example .env
116
-
```
117
-
118
-
3. **Install Frontend Dependencies:**
119
-
This project uses `npm` to manage frontend libraries. This step is required once.
120
-
```bash
121
-
cd frontend
122
-
npm install
123
-
cd ..
124
-
```
125
-
126
-
4. **Run with Docker Compose:**
127
-
This command builds the images and starts the web app, database, and Redis.
128
-
```bash
129
-
docker compose up --build
130
-
```
131
-
132
-
5. **Access the application:**
133
-
- **Portfolio:**`http://localhost:8000`
134
-
- **DevTracker:**`http://localhost:8000/tracker/`
135
-
- **Admin Panel:**`http://localhost:8000/admin`
136
-
137
85
---
138
86
139
-
## 🔄 Deployment & CI/CD
140
-
141
-
The project is configured for a fully automated, zero-downtime deployment using **GitHub Actions**. This CI/CD pipeline ensures that every change pushed to the `main` branch is automatically and safely deployed to production.
1. **Trigger:** The workflow is automatically triggered by a `push` event to the `main` branch.
146
-
2. **Build Docker Image:** A new Docker image is built based on the `src/Dockerfile`. This image contains the application code and all its dependencies, ensuring a consistent environment.
147
-
3. **Push to GitHub Container Registry (GHCR):** The newly built image is tagged and pushed to GHCR, a private container registry provided by GitHub.
148
-
4. **Deploy to Production Server:**
149
-
* The workflow securely connects to the production server using SSH keys stored in GitHub Secrets.
150
-
* It pulls the latest version of the `docker-compose.yml` file from the repository to ensure the server has the latest service definitions.
151
-
* It runs `docker compose pull` to download the new application image from GHCR.
152
-
* The services are gracefully restarted using `docker compose up -d`. Docker handles the process of stopping the old container and starting the new one with minimal downtime.
153
-
* Finally, post-deployment commands (`migrate`, `collectstatic`, `compilemessages`) are executed inside the newly running application container to apply any database changes and update static files or translations.
96
+
2.**Run with Docker Compose:**
97
+
```bash
98
+
docker compose up --build
99
+
```
154
100
155
-
This automated process not only accelerates the development cycle but also enhances reliability by eliminating manual deployment steps.
101
+
3.**Access:**
102
+
- Portfolio: `http://localhost:8000`
103
+
- DevTracker: `http://localhost:8000/tracker/`
104
+
- Admin Panel: `http://localhost:8000/admin`
156
105
157
106
---
158
107
159
-
## 🧪 Testing & Quality Assurance
160
-
161
-
This project is committed to maintaining a high standard of code quality and stability. To achieve this, a comprehensive suite of automated tests has been developed using Django's built-in `TestCase` framework.
108
+
## 🔄 CI/CD Deployment
162
109
163
-
The goal of these tests is to ensure that all core functionalities work as expected and to prevent regressions as the project evolves.
110
+
Automated deployment pipeline on every push to `main`:
164
111
165
-
### Test Coverage
112
+
1. Build Docker image with application code and dependencies
113
+
2. Push to GitHub Container Registry (GHCR)
114
+
3. SSH to production server
115
+
4. Pull latest image and gracefully restart services
116
+
5. Run database migrations, collect static files, compile translations
166
117
167
-
The test suite is designed to cover various layers of the application:
* **View & Template Integrity:** Tests verify that all primary views return a successful status code (`200 OK`) and that they render the correct templates. This ensures the basic navigation and structure of the site remain intact.
170
-
* **Context Data Validation:** We test that the correct context data is passed to the templates. For example, we verify that the `general_setup` object from the context processor is available, ensuring dynamic data from the database is displayed properly on the frontend.
171
-
* **Business Logic & Design Patterns:** Beyond standard checks, the tests validate the core application logic. A key example is the test for the **Singleton pattern** on the `GeneralSetup` model. This critical test guarantees that the architectural rule of having only one instance of site-wide settings is strictly enforced, preventing potential configuration conflicts.
172
-
* **Caching Functionality:** The test suite includes specific tests for the Redis caching layer. These tests verify that cache hits and misses work as expected, that user-specific data is cached correctly, and that the cache expires properly.
173
-
174
-
### Automated Testing with GitHub Actions
175
-
176
-
To fully automate the testing process, a dedicated **Continuous Integration (CI)** pipeline has been set up using GitHub Actions. This workflow runs independently of the deployment pipeline and focuses solely on quality assurance.
This CI workflow is configured to run on multiple triggers for comprehensive coverage:
181
-
* **On every `push` and `pull request`** to the `main` branch, providing immediate feedback on new changes.
182
-
* **On a regular schedule (nightly),** which helps to catch any potential issues that might arise over time, such as upstream dependency breakages or subtle bugs that were not triggered by recent commits.
122
+
## 🧪 Testing & Quality
183
123
184
-
The workflow's job is to:
185
-
1. Set up a clean Python environment.
186
-
2. Install all project dependencies from `requirements.txt`.
187
-
3. Run the entire test suite.
124
+
Comprehensive test suite using Django's TestCase framework:
125
+
* View and template integrity tests
126
+
* Context data validation
127
+
* Business logic verification (Singleton pattern for settings)
128
+
* Redis caching functionality tests
188
129
189
-
This multi-pronged approach acts as a robust safety net, ensuring that the project's stability and integrity are maintained at all times.
130
+
Automated CI runs on every push, pull request, and nightly schedule via GitHub Actions.
190
131
191
132
---
192
133
193
134
## 📫 Contact
194
135
195
-
If you have any questions, suggestions, or just want to connect, feel free to reach out.
0 commit comments