MakeOpenSource logo MakeOpenSource Projects GitHub Discord

Back to projects

MakeOpenSource.org

You're looking at it right now! The official website for MakeOpenSource.org, the University at Buffalo's open-source software development student club. Built with Flask and Docker, it serves as a hub for club information and project showcases.

View on GitHub

Project Structure

The proxy directory contains the Nginx configuration.

The main web application is in the web/makeopensource directory.

The application is segmented into Flask blueprints for organization, such as "general" and "projects". Each blueprint should have its own directory.

HTML templates go into subdirectories of the templates directory. Most pages should extend layouts/main_layout.html, and you should specify the title and description blocks for SEO.

Static assets, such as CSS, JavaScript, and images, go into the relevent subdirectory in the static directory. During development, the Flask development server will automatically serve these. In production, Nginx will serve these.

The application starts running in app.py. This file registers the blueprints for routing.

Local Development

Initial Setup

You'll only need to follow these steps once.

Running the Development Server

The development server provides a convenient preview of the application. It automatically reloads as changes are made to the code, so you don't have to restart it. It also runs in debug mode, which provides detailed error details in your browser.

(Fun fact: port 5877 isn't random; it's the first four digits of the SHA-256 hash of "makeopensource" expressed in base-10.)

Docker Development

Docker is a containerization platform that allows you to run software in an identical environment across different computers. If you can run the application in Docker on your computer, we should be able to run it on the production server too.

Our Docker configuration runs the web application with a production-grade Gunicorn server sitting behind an Nginx reverse proxy. Nginx serves static assets much more efficiently than Python can.

If you're updating application infrastructure/dependencies, you must test your changes in Docker!

Useful Commands and Troubleshooting