aboutsummaryrefslogtreecommitdiff
path: root/doc.go
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-09 16:54:52 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-12 12:01:51 +0200
commit2d498443031c1831925d9ba91f8795b7f994677f (patch)
tree5952a1ae36d41ce20a8257f34c7f9487131203db /doc.go
parent1e0ae41f1ec06379a6602613612c085ad053c0fa (diff)
Split server code and http code
Create multiple instances of Ideez by running NewIdeez(), after creating they can be added to the Ideezes slice to manage them. NewIdeez() imports the data and registers the routes. main.go has the code for managing the instances and server.go has the code coupled to a single instance. For eg. main.go has the code which checks files with .data extension in data directory, and imports servers on startup. - Add import functionality - Add nginx configuration - Add style and copy animation - Check for https with "X-Forwarded-Proto" - Change assets and templates to reflect the new id change - Change port to 15118 - Add Id field to Idea - Do not check for duplicate titles anymore - Extract ideez_servers into const variable - Extract documentation in doc.go - Rename Server -> Ideez - Rename t_idea/ -> templates/ - Fix cancel not working with form by using javascript instead - Set logger prefix in different contexts
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc.go b/doc.go
new file mode 100644
index 0000000..6d73b92
--- /dev/null
+++ b/doc.go
@@ -0,0 +1,40 @@
+package main
+
+// ideez is a web application that allows people to post their ideas, it is meant to help
+// brainstorming.
+
+// ToDo's
+// - [ ] htmx or websockets
+// - [ ] (server.go): update version number because data file is not compatible anymore
+// - [ ] change name for server
+// - [ ] use a hash instead of random hexes
+// - [ ] create a module and a program
+// - [x] change logger inside Ideez
+// - [x] change og: properties for ideas.html
+// - [x] import functionality for servers by walking the ideez_servers directory
+// - [x] (server.go): fix cancel on edit
+// - [x] pass mux to newServer, so we don't need to create 2
+// - [x] change CreatedAt to be Last Updated
+// - [x] edit a post
+// - [x] Store ideas to a file (encoder/gob)
+// - [x] Change the date format printing
+// - [x] outsource removing the posts to a separate cli tool
+// - [x] Add a post
+// - [x] Remove a post
+// - [x] Create a Server out of this so you can run multiple instances
+// - [x] check redirects
+
+// testing:
+// - test for incompatible versions
+// - test all routes
+// - test importing
+
+// Every server is accessible at /server/ID, then all the routes should apply with these as the "root"
+// route. eg. /server/ID/idea/edit
+//
+// When init server we
+// - associate DataFilename with the ID
+// - start it on the required address
+// - append the id and process to a list
+// - use the ID to create a path on which it will be served
+// - the newServer() function returns a handler that we can associate with a route