decred / contractor-mgmt Goto Github PK
View Code? Open in Web Editor NEWContractor management system written in Go that uses politeiad as a backend
License: ISC License
Contractor management system written in Go that uses politeiad as a backend
License: ISC License
Restrict attachments to image/jpeg
and image/png
. This depends on decred/politeia#644.
This is a full list of requirements set for the initial release:
Components:
Features:
The api.md
has not been updated since it was copied from Politeia, so it has a lot of incorrect information. It needs to be fully updated to reflect the current routes offered by cmswww
.
The userPubkeys
cache should be moved into a database table, and new pubkey-related functions, like AddPubkeyForUser()
and GetUserByPubkey()
, should be added for interacting with them.
Allow administrators to comment on specific invoices and allow the user that submitted the invoice to see the comments as well.
Add a restriction in cmswww to enforce that a user can only submit 1 invoice per month.
Required files need to be checked for existence and that they are readable.
I would also recommend loading the keypair with tls.LoadX509KeyPair() to verify correctness.
gometalinter
has recently moved gosimple
and other tools into their staticcheck
tool. staticcheck
finds a lot of errors with the current codebase, so in the PR which adds staticcheck
to goclean.sh
, we'll need to go through and fix all the issues it finds.
I'd like to suggest (and I may be happy to look at submitting a PR request myself for) using UUID's for primary keys rather than int's. One of cockroachdb's main advantage is its ability to scale horizontally, but using keys like this prevent that from being fully utilised if it's ever needed.
By using UUID's, nodes can more easily share workload. While perhaps not needed for this project (I don't see it needing the kind of scale that cdb offers, but I may not understand well), changes to database design are easiest to do now before the project is in production, and helps future-proof the design.
From the doc notes (https://www.cockroachlabs.com/docs/stable/serial.html):
In most cases, we recommend using the UUID data type with the gen_random_uuid() function as the default value, which generates 128-bit values (larger than SERIAL's maximum of 64 bits) and more uniformly scatters them across all of a table's underlying key-value ranges. UUIDs ensure more effectively that multiple nodes share the insert load when a UUID column is used in an index or primary key.
For the system to support proposals like the bug bounty program we need to be able to submit a single invoice with multiple payout amounts and multiple extended pub key's.
example a csv format:
name,relevant github link of fix,extended pub key,pay out amount
This might also be useful when we have an event and temp hires need to be paid in DCR.
Creating an invoice change and creating or update an invoice payment requires both a change to the cmswww database and also a call to politeiad (UpdateVettedMetadata). This is being done in several places throughout the code and it needs to be consolidated into a function or group of functions.
Currently, when marking an invoice as paid, it will overwrite the mdStreamPayments
with a single updated BackendInvoiceMDPayment
. But it should support an array of those payments on that stream.
We need the ability for contractors to attach things like receipts to invoices for reimbursement. We can just support PNG and JPG initially.
When using a valid email/token pair and using the following info:
username: aa
password: password
name: Alex
Location: USA
pubkey: tpub....
I receive the error:
400 Bad Request, malformed username
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.