# Todo [x] Template a Rouille server that always returns an empty 404. [x] Create a database schema. There should just be one table for now: `projects`. The Projects table contains info about each project in the board. The table should have columns for title, created time, last modified time, percentage completed (integer), and a flag for archived. Since this is a single-user server, there doesn't need to be an metadata about whose project it is. [x] Create a `Project` struct that corresponds to the schema definition. [x] Create a module or struct at your discretion for interfacing with the database. Create functions for the following: create a project, update a project's progress, archive a project, unarchive a project, and list of all projects. [x] Create a `main.css` file in src. Use mvp.css as a starting point. [x] Create a `project-card.js` file in src that creates a web component for displaying a project. [x] Using a Rouille router, create `GET /main.css` and `GET /project-card.js` endpoints that returns the relevant files. Use the include_bytes! macro. [x] Create a `GET /projects` endpoint. Using Maud for markup generation, have this endpoint return an HTML page that shows all projects. Each project should be a `project-card` web component. Keep the page simple: no title or any buttons currently. [x] Create a `POST /projects` endpoint that accepts URL encoded data and creates a new project. [x] Create a `GET /new-project` endpoint that returns a HTML page with a project creation form. Keep it simple. [x] Add .env file support using the dotenv crate. Load environment variables on server startup. [x] Create a `GET /login` endpoint that returns a simple HTML login form (username and password fields). [x] Add a rouille::session manager to set a session cookie. [ ] Create a `POST /login` endpoint that validates credentials against USERNAME and PASSWORD environment variables. [ ] Protect write endpoints (POST /projects, and any future write operations) with authentication. Redirect to /login if not authenticated. [ ] Add a login button to the front page (GET /projects) that links to /login. [ ] When logged in, show a "Create Project" button on the front page that links to /new-project. [ ] When logged in, add an edit icon to each project-card web component. Clicking the icon opens a dialog with a form to update the progress percentage and archive/unarchive the project. [ ] Create POST endpoints for updating project progress and archiving/unarchiving projects (these will be called from the edit dialog).