# Project export: Paperlink

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 10.0
- Tagline: Paperlink is an academic document editor that supports active version control for seamless editing while being stylish, accessible, and powerful.
- Devpost: https://devpost.com/software/paperlink
- GitHub: http://github.com/sradisay/PaperLink
- Team: 4 GitHub contributor(s) — gdodge0 (44 commits), Sterling t Radisay (6 commits), aren (5 commits), evanshahrestany (5 commits)

## Devpost submission (written by the team)

### Inspiration

Google docs and Github combined

### What it does

Paperlink is a streamlined, all-in-one writing platform, primarily marketed towards students. Its key feature is the advanced version control framework the platform is built on. By saving and storing every edit and manipulation to a document, we can offer features to the user to help them both reflect on and take control of their writing process. The platform will be integrated with Canvas, TurnItIn, and other educational platforms to allow Paperlink to grow into the preferred platform for professors and students alike.

### How we built it

We built using python and the Django web-framework, using Bootstrap for frontend styling, and building a rich text editor in pure HTML and JS from the ground up.

### Challenges we ran into

Creating and managing a system of deltas for accurately tracking changes in user documents in a performant manner

### Accomplishments we're proud of

Version control, stylish interface, and improving meta cognition in the writing process.

### What we learned

Aren: Because it was my first time working on any kind of big project and this being my first hackathon, I learned a ton. Although I have never worked on frontend or UI/UX on anything till now, I feel like I did a great job of making things look nice for our project. This project has taught me so much and really made me believe in my abilities! Sterling: I learned about the intricacies of version control and the complexity of creating an advanced rich text editor. I enjoyed the process of communicating with my peers and advancing my teamwork abilities. Evan: I learned that building a rich text editor is hard. Building one using completely new groundwork for text manipulation data, conceptualized and developed by me and my team within the past 36 hours, is harder. But in all my experience, Paperlink has been by far the most fascinating project I've developed with the most complex and interesting technology behind it, and I had a blast developing it the entire way. Gabe: I learned not to underestimate seemingly simple tasks. Going into this project, I felt as if a metacognitive text editor would be a fairly simple task, however, this failed to consider all of the algorithms that would have to be implemented to handle user input, process it clientside, further process it serverside, and allow for streaming of changes to document viewers. Our solution to this problem, Deltas, helped to build my problem solving skills.

### What's next

We plan on iterating upon our platform to create an all-in-one writing platform to serve not only educational institutions, but also writing professionals and hobbyists. We plan to implement further version control methods, as well many features to inspire metacognition and rethink the writing process.

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 66 recognized source files, 619 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- Django (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (66 of 66)

```
dashboard/__init__.py
dashboard/admin.py
dashboard/apps.py
dashboard/models.py
dashboard/tests.py
dashboard/urls.py
dashboard/views.py
editor/__init__.py
editor/admin.py
editor/apps.py
editor/models.py
editor/tests.py
editor/urls.py
editor/views.py
main/__init__.py
main/admin.py
main/apps.py
main/forms.py
main/models.py
main/tests.py
main/urls.py
main/views.py
manage.py
pl/__init__.py
pl/asgi.py
pl/settings.py
pl/urls.py
pl/wsgi.py
static/css/bootstrap.css
static/css/dashboard/dashboard.css
static/css/editor.css
static/css/editor/document_viewer.css
static/css/main/main.css
static/js/app/app.js
static/js/bootstrap.bundle.js
static/js/bootstrap.js
static/js/dashboard/dashboard_modals.js
static/js/dashboard/dashboard.js
static/js/editor/delta_consumer.js
static/js/editor/delta_generator.js
static/js/editor/document_viewer.js
static/js/editor/editor.js
templates/base/base.html
templates/dashboard/dashboard_modals.html
templates/dashboard/dashboard.html
templates/editor/document_viewer.html
templates/editor/editor.html
templates/editor/version_viewer.html
templates/editor/versions.html
templates/info/info.html
templates/main/home.html
templates/registration/login.html
templates/registration/register.html
ws_api/__init__.py
ws_api/admin.py
ws_api/apps.py
ws_api/consumers.py
ws_api/forms.py
ws_api/models.py
ws_api/scripts/delta.py
ws_api/scripts/flatten.py
ws_api/scripts/getdoc.py
ws_api/scripts/subsearch.py
ws_api/tests.py
ws_api/urls.py
ws_api/views.py
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- EPIC fixes3 - presentation
- EPIC fixes2
- Merge remote-tracking branch 'origin/master'
- EPIC fixes
- fix slider first delta bug
- Delete .idea directory
- over consumption
- Merge remote-tracking branch 'origin/master'
- over consumption
- cursor always moves to end on page load
- Merge remote-tracking branch 'origin/master'
- changes
- Delete .idea directory
- Added Preview to dashboard
- Fixed login and register
- consumer consumes consuming consumers consume consumers consuming consumers consume consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming
- consumer consumes consuming consumers consume consumers consuming consumers consume consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming
- remove is root
- remove is root
- consumer consumes consuming consumers consume consumers consuming consumers consume consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming  consumers consuming consume consumers consuming

## Key source files (fetched from GitHub, selected and truncated for size)

### static/js/app/app.js

```javascript
/*This is for animation stuff*/

const observer = new IntersectionObserver((entries) => {
    entries.forEach((entry) => {
        console.log(entry)
        if(entry.isIntersecting) {
            entry.target.classList.add('show');
        } else {
            entry.target.classList.remove('show');
        }
    });
});

const hiddenElements = document.querySelectorAll('.hidden');
hiddenElements.forEach((el) => observer.observe(el));

var navbar = document.getElementById("navbar");
var menu = document.getElementById("menu");

window.onscroll = function(){
    if(window.pageYOffset >= menu.offsetTop){
        navbar.classList.add("sticky");
    } else {
        navbar.classList.remove("sticky")
    }
}
```

### manage.py

```python
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
    """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pl.settings')

    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()

```

### dashboard/models.py

```python
from django.db import models

# Create your models here.

```

### dashboard/tests.py

```python
from django.test import TestCase

# Create your tests here.

```

### editor/tests.py

```python
from django.test import TestCase

# Create your tests here.

```

### main/tests.py

```python
from django.test import TestCase

# Create your tests here.

```

### ws_api/tests.py

```python
from django.test import TestCase

# Create your tests here.

```

### dashboard/admin.py

```python
from django.contrib import admin

# Register your models here.

```

### ws_api/admin.py

```python
from django.contrib import admin

# Register your models here.

```

### ws_api/models.py

```python
from django.db import models
from main.models import User

# Create your models here.

```

[47 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]