Skip to content

Rafal5671/DayLayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daylayer

A self-hosted personal productivity app for managing notes, tasks and bookmarks. Built with Django REST Framework, Vue 3 and two independent Python services communicating via Redis Pub/Sub.


Build Status

Platform Frontend Backend Database Auth Mail Containerized API Docs Language Tests


Description

Daylayer is a full-stack personal productivity application that combines notes, tasks and bookmarks into a single, clean interface. It is built with a Django REST API backend, a Vue 3 frontend, and two independent microservices — a scraping service and a notification service — communicating through Redis Pub/Sub.

When a bookmark is saved, the scraping microservice automatically fetches its title, description. Email notifications are sent on key account events such as registration, password change, profile update and daily task deadlines.


Features

  • User registration and login with JWT authentication
  • Notes with Markdown support and tag filtering
  • Tasks with priority levels, deadlines and status tracking
  • Bookmarks with automatic metadata scraping via a dedicated microservice
  • Email notifications via a dedicated notification microservice
  • Daily deadline reminders via Celery Beat
  • Settings panel with profile editing, password change and account deletion
  • Swagger API documentation
  • Unit and integration tests with pytest
  • Dockerized full-stack environment

Tech Stack

  • Frontend: Vue 3, TypeScript, Pinia, Vue Router, Tailwind CSS, Axios
  • Backend: Python, Django, Django REST Framework, SimpleJWT, Celery, Celery Beat
  • Scraping Service: FastAPI, BeautifulSoup4, Redis Pub/Sub
  • Notification Service: FastAPI, aiosmtplib, Jinja2, Redis Pub/Sub
  • Database: PostgreSQL
  • Cache / Broker: Redis
  • Authentication: JWT
  • Email: Mailpit (development)
  • API Docs: Swagger (drf-spectacular)
  • Testing: pytest, pytest-django, pytest-mock
  • Containerization: Docker, Docker Compose

Project Structure

daylayer/
├── docker-compose.yml
├── backend/                        # Django REST API
│   ├── Dockerfile
│   ├── requirements.txt
│   ├── pytest.ini
│   ├── tests/
│   │   ├── test_users.py
│   │   ├── test_notes.py
│   │   ├── test_tasks.py
│   │   └── test_bookmarks.py
│   ├── config/
│   │   ├── settings.py
│   │   ├── urls.py
│   │   └── celery.py
│   └── apps/
│       ├── users/                  # Auth, profile, password
│       ├── notes/                  # Notes CRUD
│       ├── tasks/                  # Tasks CRUD with filtering
│       └── bookmarks/              # Bookmarks with scraping integration
├── scraping-service/               # FastAPI microservice
│   ├── Dockerfile
│   └── main.py
├── notification-service/           # FastAPI microservice
│   ├── Dockerfile
│   ├── main.py
│   ├── handlers/
│   │   ├── user.py
│   │   ├── bookmark.py
│   │   ├── task.py
│   │   └── account.py
│   └── emails/
│       ├── sender.py
│       └── templates/
└── frontend/                       # Vue 3 SPA
    ├── Dockerfile
    ├── nginx.conf
    └── src/
        ├── api/
        ├── stores/
        ├── types/
        ├── router/
        ├── components/
        └── views/

Architecture

┌─────────────┐     HTTP      ┌─────────────────┐     SQL      ┌──────────────┐
│   Vue 3     │ ────────────► │   Django API     │ ──────────► │  PostgreSQL  │
│  Frontend   │               │   (port 8000)    │             └──────────────┘
└─────────────┘               └─────────────────┘
                                       │
                                  Redis Pub/Sub
                                       │
                    ┌──────────────────┼──────────────────┐
                    ▼                  ▼                   ▼
           ┌──────────────┐  ┌──────────────────┐  ┌──────────────┐
           │   Celery     │  │ Scraping Service  │  │Notification  │
           │   Worker     │  │   (port 8001)     │  │  Service     │
           └──────────────┘  └──────────────────┘  │ (port 8002)  │
                                                    └──────────────┘
                                                           │
                                                           ▼
                                                      ┌─────────┐
                                                      │ Mailpit │
                                                      │  :8025  │
                                                      └─────────┘

Getting Started

Prerequisites

  • Docker + Docker Desktop
  • Git

1. Clone the repository

git clone https://github.com/Rafal5671/DayLayer.git
cd DayLayer

2. Create .env files

cp backend/.env.example backend/.env
cp scraping-service/.env.example scraping-service/.env
cp notification-service/.env.example notification-service/.env

3. Run the full stack

docker compose up --build

4. Run migrations

docker compose exec backend python manage.py migrate

5. Open in browser

Service URL
App http://localhost
API http://localhost:8000/api
Swagger http://localhost:8000/api/docs
Mailpit http://localhost:8025

Running Tests

cd backend
python -m pytest tests/ -v

API Overview

Method Endpoint Auth Description
POST /api/users/register/ Public Register new user
POST /api/users/login/ Public Login and get JWT token
GET /api/users/me/ Required Get current user profile
PATCH /api/users/me/ Required Update profile
DELETE /api/users/me/ Required Delete account
POST /api/users/change-password/ Required Change password
GET /api/notes/ Required List notes
POST /api/notes/ Required Create note
PUT /api/notes/{id}/ Required Update note
DELETE /api/notes/{id}/ Required Delete note
GET /api/tasks/ Required List tasks (filterable by status)
POST /api/tasks/ Required Create task
PATCH /api/tasks/{id}/ Required Update task
DELETE /api/tasks/{id}/ Required Delete task
GET /api/bookmarks/ Required List bookmarks
POST /api/bookmarks/ Required Create bookmark (auto-scraping)
DELETE /api/bookmarks/{id}/ Required Delete bookmark

Full interactive documentation available at /api/docs/.


Email Notifications

Event Trigger
Welcome email User registration
Bookmark ready Scraping microservice completes
Tasks due today Celery Beat runs daily at 8:00 AM
Password changed User changes password
Profile updated User updates username or email
Account deleted User deletes their account

Example Screenshots

Screenshot 2026-05-11 at 17-11-47 Vite App Screenshot 2026-05-11 at 17-11-56 Vite App Screenshot 2026-05-11 at 17-12-03 Vite App Screenshot 2026-05-11 at 17-12-09 Vite App Screenshot 2026-05-11 at 17-12-14 Vite App Screenshot 2026-05-11 at 17-12-34 Vite App

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors