Commit Graph

24 Commits

Author SHA1 Message Date
ekzyis 845157c954 Add market form + page
* market form with question, description and end date
* markets cost 1k sats
* a goroutine polls pending invoices from the db and checks LND for their status
* markets are listed on front page (after paid)
* market page contains buttons to bet yes or no
* users have names now

TODO:
* show correct market percentage
* show how percentage changed over time in chart
* validate end date
* implement betting / order form
2024-08-24 02:35:15 -05:00
ekzyis 782bfec93a Implement logout 2024-07-14 13:39:42 +02:00
ekzyis 9a92444eee Add session middleware 2024-07-12 15:30:50 +02:00
ekzyis 2653e816bb Implement LNURL-auth 2024-07-12 15:18:44 +02:00
ekzyis ee3e5e82e4 Remove old code
* removed code that will not be used
* removed code that will most likely be rewritten
2024-07-12 11:00:51 +02:00
ekzyis 94d1f6c1d8 Add login page 2024-07-12 07:12:57 +02:00
ekzyis 02944da696 Add /about 2024-07-10 09:14:06 +02:00
ekzyis 3d3ae16617 Index page with templ 2024-07-10 04:47:25 +02:00
ekzyis fe5feccfee Implement market settlement 2023-12-04 01:36:59 +01:00
ekzyis c7ae559777 Implement withdrawal 2023-12-03 06:21:57 +01:00
ekzyis 49cacb266c Order cancelation 2023-12-02 23:22:14 +01:00
ekzyis c9de76ac75 Add market stats page 2023-11-29 04:11:46 +01:00
ekzyis e84db076a4 Use router-view for markets 2023-11-27 00:59:15 +01:00
ekzyis c96eeb7668 Show user orders 2023-11-27 00:21:39 +01:00
ekzyis 6d7cd2573d Show user invoices 2023-11-26 22:35:51 +01:00
ekzyis ce64608894 Allow creation of markets 2023-11-20 02:52:08 +01:00
ekzyis ebdf0d1e90 Add order form
* add POST /api/order -> 402 Payment Required
* redirect to /invoice/:id
2023-11-20 00:38:52 +01:00
ekzyis 55afc3b097 Add /market/:id route 2023-11-20 00:38:52 +01:00
ekzyis cdeb088a13 Show market list 2023-11-08 03:01:58 +01:00
ekzyis 5c225c1f25 Add logout button to /user 2023-11-07 14:02:25 +01:00
ekzyis 4e343d49d0 implement login with vue
* use vue router
* use pinia
* use tailwindcss
* use vite
* transform /api/login and /api/login/callback into JSON APIs
* add Access-Control-Allow-Credentials header
* add TODO about JSON errors
2023-11-07 09:06:35 +01:00
ekzyis 9a87fe7342 Rename to HandleInvoiceStatus 2023-11-03 23:43:56 +01:00
ekzyis c66e96bf3f refactor: fix init and use DI
* fix init misuse which makes running tests impossible since tests are run inside a temporary test directory which breaks env loading

* use dependency injection pattern for server creation and global server context in route handlers
2023-11-03 20:34:21 +01:00
ekzyis 7558655458 refactor: Structure code into different packages
I have put too much code into the same files.

Also, I put everything into the same package: main.

This package is only meant for executables.

Therefore, I have refactored my code to use multiple packages. These packages also guarantee separation of concerns since Golang doesn't allow cyclic imports.
2023-09-10 23:13:08 +02:00