Skip to content

ggeerraarrdd/lafs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub release Maintenance Codacy Badge codecov Quality Gate Status Renovate enabled

LAFS

A digital archive of the Landscape Architecture Film Series website from the early aughts

Table of Contents

Note

ALL CONTENTS IN THIS REPO ARE FOR EDUCATIONAL PURPOSES ONLY.

Description

LAFS serves as a digital archive for the website of the Landscape Architecture Film Series, a student-led initiative which I co-founded and co-curated for the Department of Landscape Architecture at the University of Illinois Urbana-Champaign in the early 2000s.

This repository preserves a sentimental piece of personal digital history. What would otherwise exist only as slowly disintegrating bits on a forgotten CD in a remote storage facility, as fragmented snapshots somewhere in the depths of the Internet Archive, or as a vaselined landscape in some province of collective memory hasβ€”here and at l-a-f-s.orgβ€”been meticulously restored and recreated.

To learn how this project came about, check out LAFS-DEV.

LAFS

Target Users

LAFS is intended for:

  • Self-guided learners seeking a reference implementation of modern backend web architecture powering a straightforward content website with simple navigation patterns.
  • Landscape architecture students and faculty interested in the intersection of film and landscape studies.
  • Cinema enthusiasts looking for a few good films to watch.

Features

  • πŸ“š Historical Preservation - Faithful recreation of website from the early 2000s
  • 🌐 Modern Dev Tooling - Implementation of a modern web architecture and software development practices
  • πŸ“± Dynamic Responsiveness - Mobile-adjustable layout for today's wide range of devices
  • 🎬 Curated Film Database - Recreated collection preserving information about past screenings
  • πŸ—ΊοΈ Location Context - Google Maps integration for historical site reference

Project Structure

lafs/
β”‚
β”œβ”€β”€ app/
β”‚   β”‚
β”‚   β”œβ”€β”€ blueprints/
β”‚   β”‚   β”‚
β”‚   β”‚   └── main/
β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚   β”‚       β”œβ”€β”€ routes.py
β”‚   β”‚       β”œβ”€β”€ static/
β”‚   β”‚       └── templates/
β”‚   β”‚
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── __init__.py
β”‚   β”‚
β”‚   β”œβ”€β”€ crud/
β”‚   β”‚   └── __init__.py
β”‚   β”‚
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── lafs.db
β”‚   β”‚
β”‚   β”œβ”€β”€ infra/
β”‚   β”‚   └── __init__.py
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── __init__.py
β”‚   β”‚
β”‚   └── app.py
β”‚
β”œβ”€β”€ logs/
β”‚
β”œβ”€β”€ assets/
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt

Quick Start

For those who want to get up and running quickly with default settings:

# Clone repository
git clone https://github.com/ggeerraarrdd/lafs.git
cd lafs

# Set up environment
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

# Run app
cd app
flask run

# Navigate to the URL specified in the terminal output

Local Setup

Prerequisites

Before you begin, ensure you have met the following requirements:

  1. Development Tools

    • Python 3.12 (not tested on other versions)
    • git (for cloning the repository)
  2. Google Maps API Key

    For the embedded maps to work, you need to set up a Google Maps API Key. Before you can create one, you will need to create a Google Cloud project, for which you need a Google Cloud account.

Dependencies

  • See requirements.txt

Installation

  1. Clone the repository

    git clone https://github.com/ggeerraarrdd/lafs.git
    cd lafs
  2. Set up a Python virtual environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies

    pip install --upgrade pip
    pip install -r requirements.txt
    

Configuration

  1. Create an .env file

    Place the file in the root directory and add the following as default:

    # Database Path
    DATABASE_NAME='data/lafs.db'
    
    # Database Connection Pool
    POOL_SIZE=5
    MAX_OVERFLOW=10
    POOL_TIMEOUT=30
    POOL_RECYCLE=-1
    ECHO=False
    
    # Custom Database Retry Settings
    MAX_RETRIES=3
    BASE_DELAY=1
    MAX_DELAY=10
    
    # Logging
    IS_LOGGING=False
    
    # Flask Secret Key
    SECRET_KEY='192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf'
    
    # Google Maps API Key
    MAP_API_KEY='your_map_api_key'
  2. Database Options Explained

    DATABASE_NAME - path to SQLite database file

    SQLAlchemy Engine/Connection Pool Parameters:

    • POOL_SIZE - max number of persistent connections
    • MAX_OVERFLOW - max number of connections above POOL_SIZE
    • POOL_TIMEOUT - seconds to wait for available connection
    • POOL_RECYCLE - seconds before connection is recycled
    • ECHO - enable SQLAlchemy engine logging

    Custom Retry Mechanism Parameters:

    • MAX_RETRIES - max retry attempts for failed operations
    • BASE_DELAY - initial delay between retries in seconds
    • MAX_DELAY - max delay between retries in seconds
  3. Logging Option Explained

    The logging functionality can be controlled through IS_LOGGING:

    IS_LOGGING=False

    When logging is enabled (IS_LOGGING=True):

    • Log files are created and stored in the logs/ directory at the root of the project.
    • SQL query execution times, transaction status and errors are tracked.
    • Each log entry includes the calling function name for better traceability.
  4. Flask Secret Key Option Explained

    From Flask's official documentation: A secret key that will be used for securely signing the session cookie and can be used for any other security related needs by extensions or your application. It should be a long random bytes or str. For example, copy the output of this to your config:

    $ python -c 'import secrets; print(secrets.token_hex())'
    '192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf'

    The above is the system default and should only be used for local development. You can generate a new one using the secrets module from the Python standard library or using your preferred method.

Usage

  1. Go into the app directory and run the command:

    flask run
  2. Open the film series website

    Navigate to the URL specified in the terminal output. For example:

    * Running on http://127.0.0.1:5000

Production Setup

  • TBD

System Administration

  • TBD

Author(s)

Version History

Release Notes

Initial Release

The original website is archived on the Internet Archive.

Future Work

  • Go to Issues and filter for the enhancement label.

License

Contributing

This project is not accepting contributions at this time. It is intended solely for personal learning and exploration. However, feel free to clone the repository and use it as a learning resource.

Acknowledgments

  • The distribution code for CS50's Finance pset served as a template for the app.

Screenshots

LAFS (Image created using Portfoliofy.)

LAFS LAFS LAFS LAFS

Frontispiece

Landscape Architecture Film Series. (2002). Screenshot of website [Digital image]. Captured 2023. Retrieved from https://l-a-f-s.org

About

A digital archive for the Landscape Architecture Film Series website from the early aughts

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •