<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CristianZArellano</title>
    <description>The latest articles on DEV Community by CristianZArellano (@cristianzarellano).</description>
    <link>https://dev.to/cristianzarellano</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3463900%2F079a547f-0ff7-45fd-8dc4-df057bdc98aa.png</url>
      <title>DEV Community: CristianZArellano</title>
      <link>https://dev.to/cristianzarellano</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cristianzarellano"/>
    <language>en</language>
    <item>
      <title>🍽️ Building ReservaFlow: A Django + Celery + Redis Reservation System</title>
      <dc:creator>CristianZArellano</dc:creator>
      <pubDate>Thu, 28 Aug 2025 08:37:39 +0000</pubDate>
      <link>https://dev.to/cristianzarellano/building-reservaflow-a-django-celery-redis-reservation-system-2im7</link>
      <guid>https://dev.to/cristianzarellano/building-reservaflow-a-django-celery-redis-reservation-system-2im7</guid>
      <description>&lt;p&gt;👋 Hi everyone! I'm &lt;strong&gt;Cristian&lt;/strong&gt;, a Python backend developer, and I'm excited to share one of my latest projects: &lt;strong&gt;ReservaFlow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;ReservaFlow is a &lt;strong&gt;restaurant reservation management system&lt;/strong&gt; designed to handle real-world scenarios like reservation expiration, double-booking prevention, and async notifications. I'm building it using a modern Django backend stack.&lt;/p&gt;




&lt;h3&gt;
  
  
  📝 A Note on This Project
&lt;/h3&gt;

&lt;p&gt;This project is currently under &lt;strong&gt;active development&lt;/strong&gt;. My main goal with &lt;strong&gt;ReservaFlow&lt;/strong&gt; is to dive deep into backend architecture and gain hands-on experience by combining several powerful technologies. The idea is to fully implement and get the benefits of using &lt;strong&gt;Celery&lt;/strong&gt; for async tasks, &lt;strong&gt;Redis&lt;/strong&gt; for distributed locking, and &lt;strong&gt;Docker&lt;/strong&gt; for a production-ready environment.&lt;/p&gt;

&lt;p&gt;I’m taking a step-by-step approach to build this system. As part of my process, I've been experimenting with &lt;strong&gt;uv&lt;/strong&gt; for dependency management. While I'm still evaluating how well it works for team collaboration, I've been really impressed by its speed and performance so far!&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Django 5 + Django REST Framework (DRF)&lt;/strong&gt; → Clean and modular API
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt; → Relational database
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Celery + Redis&lt;/strong&gt; → Async tasks &amp;amp; distributed locking
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker &amp;amp; Docker Compose&lt;/strong&gt; → Production-ready containerization
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;uv&lt;/strong&gt; → Modern Python dependency management
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔑 Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Online reservation system with pending/confirmed/expired states
&lt;/li&gt;
&lt;li&gt;User authentication and customer management
&lt;/li&gt;
&lt;li&gt;Restaurant &amp;amp; table management
&lt;/li&gt;
&lt;li&gt;Reservation expiration handled with Celery scheduled tasks
&lt;/li&gt;
&lt;li&gt;Email notifications (confirmation + reminders) via async workers
&lt;/li&gt;
&lt;li&gt;Redis-powered &lt;strong&gt;distributed lock&lt;/strong&gt; to prevent double bookings
&lt;/li&gt;
&lt;li&gt;Caching with Redis for faster table availability checks
&lt;/li&gt;
&lt;li&gt;Django Admin panel for full control
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📂 Project Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;restaurant-reservations/
├── config/           # Project-level settings and URLs
├── customers/        # Customer management
├── notifications/    # (WIP) Notification handling
├── reservations/     # Reservation core logic
├── restaurants/      # Restaurant and tables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ Key Design Decisions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous tasks&lt;/strong&gt;: Reservation expiration and email notifications are processed by Celery workers so the API stays responsive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributed locking with Redis&lt;/strong&gt;: To prevent two users from booking the same table at the same time, I added a Redis lock service. If the lock is held, the API returns a &lt;code&gt;423 Locked&lt;/code&gt; error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt;: Table availability checks first query Redis before hitting the database, improving performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📬 API Example
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a Reservation
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;http&lt;br&gt;
POST /api/reservations/&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request body:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;json&lt;br&gt;
{&lt;br&gt;
  "restaurant_id": 1,&lt;br&gt;
  "customer_id": 1,&lt;br&gt;
  "table_id": 1,&lt;br&gt;
  "reservation_date": "2025-08-30",&lt;br&gt;
  "reservation_time": "19:00:00",&lt;br&gt;
  "party_size": 2&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;json&lt;br&gt;
{&lt;br&gt;
  "id": "new-uuid-of-reservation",&lt;br&gt;
  "status": "pending",&lt;br&gt;
  "expires_at": "2025-08-30T18:50:00Z",&lt;br&gt;
  "message": "Reservation created successfully"&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Local Setup
&lt;/h2&gt;

&lt;p&gt;To get the project running locally, you can clone the repository and follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git clone https://github.com/CristianZArellano/ReservaFlow.git&lt;br&gt;
cd ReservaFlow/restaurant-reservations&lt;br&gt;
uv sync&lt;br&gt;
uv run python manage.py migrate&lt;br&gt;
uv run python manage.py runserver&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or run everything with Docker:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
docker-compose up --build&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 What’s Next?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Define and implement the &lt;code&gt;Notification&lt;/code&gt; model&lt;/li&gt;
&lt;li&gt;Improve automated testing with &lt;code&gt;pytest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Deploy a live demo&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  👨‍💻 About Me
&lt;/h2&gt;

&lt;p&gt;I’m &lt;strong&gt;Cristian Z. Arellano&lt;/strong&gt;, a backend developer passionate about building scalable APIs with Python and Django.&lt;/p&gt;

&lt;p&gt;You can find the full project on my GitHub: &lt;a href="https://github.com/CristianZArellano" rel="noopener noreferrer"&gt;CristianZArellano&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✨ Thanks for reading! I'd love to hear feedback from other Django and backend devs — what would you improve or add?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;




&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
