Markdown Converter
Agent skill for markdown-converter
Autogov was built using the help of Codapt.ai, my full-stack AI developer tool. If you're interesting in Codapt, reach out to me at: [email protected]
Sign in to like and favorite skills
Autogov was built using the help of Codapt.ai, my full-stack AI developer tool. If you're interesting in Codapt, reach out to me at: [email protected]
use a react context to pass the user's wallet address from Web3Component to child components
create a new chain definition const CHAINS which is a list of EVM blockchains. include ethereum and polygon to start. include parameters name, chainId, and rpc.
add new constant
chains which is a list of EVM blockchains. include ethereum and polygon to start. include parameters name, chainId, and rpc.
on the home page, we want to show a list of organizations. a project will consist of a name, wallet address, and chain name. use dummy data for now. add a bit of style to make the list look nice, with each item being a box showing the info inside.
add a database table to store organizations which have name, wallet address, chainId, and createdAt
add a way to create a new organization by clicking a button on the home page which takes you to another page to add the organization
the organization list seems to be adding organizations with dummy data. it shouldn't be adding them at all.
when adding an organization, the wallet address passed from the client to the server should be grabbed from WalletAddressContext
add some styling to the add organization form
when adding an organization, let the user select a chain from a dropdown from the
chains const. show chain names in the dropdown.
after a user adds an organization, take them back to the home page
in the organization list, show the name of the chain instead of the chain id. look up the name in the
chains const
add a per-organization page, /organization/
in the ui and database schema, change organization's wallet address to be creator address instead
add new database fields for an organization privkey and pubkey
when creating a new organization, a public and private key should be generated and saved in the database using ethers v5 which is installed. don't prompt the user for them.
when adding an organization, make sure the chain id exists in the chains const
the labels in the add organization form are bold which is great, but the inputs should not be bold
move the add organization button to below the list and make sure there's a bit of space above it
show the "signer address", which is the pubkey, of organizations in their cards
do not expose the privkey of an organization to users at all, including in api responses
clean up the way the chain id is handled when adding an organization -- it should be an int in the procedure but it's a string right now
make organization privkey and pubkey not optional in the database schema
move the ethers wallet generation logic when adding an organization to the server side to not expose the privkey to the user
there should not be a "signer address" database field on organizations. the ui should show the pubkey as the signer address.
update the pubkey field of organizations to be created as the wallet address of the generated privkey
we are going to add "proposals", which exist under organizations and have a title, description, createdAt, and creatorAddress. they also have integer yes votes and no votes.
when a proposal is created, the creatorAddress should be the user's connected wallet address from the react context
instead of tracking yes and no votes within the proposal table, we want to track them as their own rows in their own table -- with boolean isYes, pointer to the proposal, and voterAddress yes count should be all the votes where isYes is true, and no count the others
remove vote tracking for proposals, and remove the vote properties on proposal database rows
when a proposal is created, kick off a background task to calculate the code for that proposal, using the getProposalCodeFromDescription function, and store it in a new column
code. track the status of this in a new column of the proposal table codeGenerationStatus
in proposal cards, if the code generation status is completed, instead of showing the code inline, show a button to pop it up in a simple modal / pop-up (do not use any modal library, just build it yourself). make sure that the code in the modal is in a tailwind whitespace pre, and make it light text on dark background in monospace font to make it clearly code.
while code generation is pending in a proposal card, show a small spinner. you can use this example code: function Spinner() { return ( ); }
make the styling of the app more consistent across components, using the same shadow and padding for cards and forms
in proposal cards, show the description within a nicely styled gray box to make it stand out a bit more
add "status" field to proposal in the database, which starts as "voting" by default, and shows up in proposal cards. don't worry about modifying it anywhere, we'll do that later
add "vote yes" and "vote no" red and green buttons next to each proposal. "vote no" should update the proposal's status to "rejected", and "vote yes" to "accepted".
show appropriate emojis based on the status (voting - something to indicate voting, implementing - probably a robot, implemented - probably a green check, rejected - red x) to the left of the proposal name on the proposal cards