# Half-Bakery Project Specification
A simple Flask-based project idea repository for classroom use. Students can post "half-baked" project ideas and comment on them with flat chronological threading.
- Local Raspberry Pi deployment
- Accessible via local network (host='0.0.0.0')
- Python 3 with Flask and Flask-SQLAlchemy
- SQLite database
- No authentication required (educational tool)
id(Integer, Primary Key)title(String, 200 chars)filepath(String) - path to .md or .txt file containing project descriptioncreated_at(DateTime)author_name(String, 100 chars) - plain text, not a foreign key
id(Integer, Primary Key)project_id(Integer, Foreign Key → projects.id)student_name(String, 100 chars) - plain text, not a foreign keycomment_text(Text)parent_comment_id(Integer, Foreign Key → comments.id, nullable)quoted_text(Text, nullable) - snippet from parent comment for displaycreated_at(DateTime)
- Project descriptions stored as individual files (markdown or text)
- Files stored in a
projects/directory - Filenames can be:
project_<id>.mdor similar convention - Database stores only the filepath, not the content
- Flask reads file content when rendering the project page
- Home page listing all projects
- Display: project title, author, creation date
- Link to each project page
- Display single project page
- Read and render project description from file
- Show all comments in chronological order (flat list)
- Display quoted text in styled box if comment has parent_comment_id
- Include comment form at bottom
- Add new comment to project
- Form fields:
student_name(required)comment_text(required)parent_comment_id(optional)quoted_text(optional)
- Redirect back to project page after submission
- Form to create new project
- Fields:
title(required)author_name(required)description(textarea, required)
- On submit: create project record, write description to file
- Handle new project creation
- Create database entry
- Write description to file in
projects/directory - Redirect to new project page
- All comments display in chronological order (oldest first)
- No visual nesting or indentation
- If comment has
parent_comment_id:- Display quoted text in a distinct style (gray background, smaller font)
- Show "In reply to [parent author]" or similar
- Quote appears inline above the comment text
- Each comment has a "Reply" button/link
- Clicking "Reply" on comment #5:
- Scrolls to comment form
- Pre-fills
parent_comment_idfield (hidden) - Pre-fills quoted text in a visible "Quoting:" preview box
- User can edit/trim the quote before submitting
- User can clear the reply to post a standalone comment
- Clean, readable typography
- Similar feel to old phpBB/vBulletin forums
- Mobile-friendly basic responsive design
- Minimal JavaScript (enhance progressively if needed)
- Keep code readable for novice students
- Clear function and variable names
- Comments explaining key concepts
- Separate templates for different pages
- Use Jinja2 template inheritance for consistency
- 404 for non-existent projects
- Handle missing files gracefully
- Basic form validation
- User-friendly error messages
- Edit/delete comments
- User authentication
- Markdown rendering for project descriptions
- Search functionality
- Project tags/categories
- Vote/like system
- Create a new project
- View project page
- Add standalone comment
- Reply to a comment with quote
- Verify chronological ordering
- Check file storage/retrieval
- Test from multiple devices on local network
- Verify datetime stamps display correctly