Commit graph

177 commits

Author SHA1 Message Date
7f0b52c5b5 Fix linter warnings 2022-05-29 15:43:45 +02:00
368bd8eefb Remove old code
- remove the old code and its dependencies
- perform some refactoring and fix notifications
- add TODO tags for observed shortcomings
- rename voters.go to users.go
- implement health check for SMTP connection
2022-05-29 15:36:27 +02:00
28ddbd2ce6 Implement motion withdraw 2022-05-29 12:01:58 +02:00
c12aaf4d89 Implement proxy voting 2022-05-27 20:45:04 +02:00
0c02daf29a Implement direct voting 2022-05-27 17:40:01 +02:00
164495c818 Improve design
- improve icons
- implement VoteChoice and VoteStatus as real types with Scanner and Value
  methods
2022-05-27 14:42:39 +02:00
b8b6899cf3 Update modified timestamp when updating motion 2022-05-27 13:43:57 +02:00
2b98712aa8 Implement motion editing 2022-05-26 21:04:47 +02:00
335ce16547 Add tests for handlers and middleware
- drop migration 2022052601_drop_unused_decisions_colums because it was implicitly part of an earlier migration
- add /health endpoint for database health check
- add tests for the health check endpoint
- add tests for middleware secureHeaders, logRequest and tryAuthenticate
- add models.UserModel.CreateUser method
2022-05-26 19:22:56 +02:00
c3d0733e27 Replace gorilla/csrf with justinas/nosurf
- replace dependency for less indirect dependencies
- remove unused configuration options
2022-05-26 17:25:25 +02:00
257a777e03 Add Cache-Control for authenticated pages 2022-05-26 17:05:47 +02:00
d5d7525a31 Tighten http timeout settings 2022-05-26 16:53:52 +02:00
1695ce0168 Implement small improvements
- fix golangci-lint warnings
- start setup for user management
- nicer formatting of user login information
2022-05-26 16:47:57 +02:00
47092bfa9b Implement flash messages
- configure session cookie security
- setup flash message handling in newTemplateData
- show flash message in base.html
- add flash message for new motion
2022-05-26 16:30:30 +02:00
f8fbf00c4d Refactor new motion form processing
- extract form parsing into helper method app.decodePostForm
- extract field checks into form.Validate
2022-05-26 16:06:31 +02:00
a1a66b7245 Finish new motion create implementation
- rename config block mail_server to mail_config
- rename smtp server settings
- move mail notification settings to mail_config
- improve navigation templates
- prepare routes for user management
2022-05-26 15:27:25 +02:00
aa3a1b0cc7 Implement database mapping for vote types 2022-05-22 21:47:27 +02:00
e1af6876c1 Implement new motion form
- add session handler
- add form decoder from go-playground
- implement custom decoder for VoteType
2022-05-22 21:15:54 +02:00
47af34f1cd Use httprouter.NotFound and httprouter.PanicHandler 2022-05-22 15:00:50 +02:00
0ad88fe5f4 Implement motion detail view
- add httprouter for parameterized routing
- improve styling
- add routes and handlers
- implement motion detail handler
2022-05-22 14:08:02 +02:00
44a6180a09 Use alice to chain middleware 2022-05-22 12:23:42 +02:00
2ddc013c84 Add panic recovery middleware 2022-05-22 12:19:25 +02:00
c0a73494c3 Add request logging 2022-05-22 12:06:23 +02:00
4ce321dc36 Implement security headers and HTTPS 2022-05-22 11:02:37 +02:00
c4c64d0202 Add output buffering for rendered pages 2022-05-21 21:02:15 +02:00
65cce5b723 Use embedded templates 2022-05-21 20:57:32 +02:00
ff93acb65c Refactorings
- fix typo in nav.html and template functions
- implement template cache and render function
- refactor motion list methods to reduce cyclomatic complexity
2022-05-21 20:49:35 +02:00
ec7623a51a Implement timestamp pagination for motion list 2022-05-21 19:18:17 +02:00
2b8beadb77 Remove unused Print method 2022-05-21 14:30:57 +02:00
49295d2caa Add context to model methods 2022-05-21 14:27:46 +02:00
3346cb5dba Fix golangci-lint warnings 2022-05-21 14:09:19 +02:00
68d6f4bcdc Reimplement decision close job 2022-05-21 13:51:17 +02:00
01b95f2253 Start notification job refactoring 2022-05-15 20:10:49 +02:00
933f21a43c Move migrations to internal/migrations 2022-05-14 12:45:53 +02:00
ec7d2fe324 Start refactoring to packages 2022-05-09 21:09:24 +02:00
a5c1a64a3c Update go and dependency versions 2022-05-09 18:06:11 +02:00
8d0d968441 Start move to new directory structure
- create cmd/boardvoting/main.go
- adapt .goreleaser.yml and Makefile to use cmd/boardvoting for the main
  package
2022-05-08 19:17:40 +02:00
d7a742d97d Update UI framework
- add package.json for npm/npx
- update to fomantic-ui
- move ui files to ui directory
- add UI build documentation to README.md
- add ui target to Makefile
- add addPrefix handler in boardvoting.go to allow the same /static/
  prefix for static resources
2022-05-08 16:13:50 +02:00
d22f31e823 Fix copyright headers in Go files 2022-03-21 13:39:00 +01:00
87b87f7de3 Fix golangci-lint configuration
- remove redundante whitespace
- rename wrong linter-settings to linters-settings
- ignore strconv functions for gomnd linter
- use australian locale for spell checking
2022-03-21 13:37:44 +01:00
7dbef080b1 Update README 2022-03-21 12:43:30 +01:00
3a25296b37 Handle client certificate failures 2022-03-21 12:18:55 +01:00
0c2fbf9d54 Wrap error when db connection closing fails 2022-03-21 12:18:20 +01:00
623bdf6d56 Replace magic numbers with constants
- use strconv.Atoi and strconv.Itoa where appropriate
- use constants for number base and size
- use constant for reminder job interval
2022-03-21 12:16:24 +01:00
63c748bb1d Update golangci-lint configuration
- replace deprecated linters
- add more linters
2022-03-21 12:14:25 +01:00
a9290b9717 Update to go 1.17, remove duplicate go-mail
- update module to go 1.17 level
- ran go mod tidy
- bump go version in Jenkinsfile
- drop github.com/go-mail/mail
2022-03-21 12:12:09 +01:00
c3adfd9e8b Add short section explaining the project ideas 2021-04-17 21:08:48 +02:00
975f3c0837 Adapt Makefile and boardvoting.go to new ldflags 2021-04-14 19:02:44 +02:00
4d87e35ec2 Add nfpms configuration 2021-04-14 18:37:17 +02:00
806d706d4f Add goreleaser config 2021-04-14 18:37:17 +02:00