Welcome to the WakeUp Labs Optimism Retro Impact Guidelines web application. This project aims to update and expand the Optimism Impact Evaluation Framework to make it more user-friendly and accessible to the community.
For more details about the application's requirements, check out the Mission Request.
Staging: https://retroimpactguidelines.wakeuplabs.link
Production: https://retroimpactguidelines.xyz
The application streamlines the evaluation of project proposals by presenting evaluation criteria in a clear and intuitive interface. It guides users through the evaluation process, ensuring they understand the criteria for each project category and the key factors to consider during assessment. Additionally, it allows users to review past evaluation criteria.
For administrators, the application offers an in-place editor that enables them to create, update, and delete evaluation criteria while visualizing changes in real time.
This project is fully open source and licensed under MIT.
A round represents a specific time period during which evaluation criteria are applied. Each round contains a set of criteria that evaluators use to assess projects. When a new round is created, the system can copy data from a previous round to maintain consistency.
A project category defines a type of project under evaluation. Each category groups similar projects and determines the criteria used for assessment within that category.
Evaluation steps define the structured criteria for assessing a project within a specific category. Each step represents a different aspect of the evaluation process and helps guide users through the assessment.
- Log In as an Admin – Only whitelisted users from our database can access the admin mode.
- Create a Round – Administrators create a round, which sets the evaluation criteria for a specific time period. If a previous round exists, the application copies its data into the new round.
- Create a Project Category – Once a round is created, administrators must define a project category.
- Create Evaluation Steps – Within each category, administrators can add one or more steps, each containing specific evaluation criteria to guide users through the assessment process.
sequenceDiagram
User->>+Frontend App : login
Frontend App->>+Cognito : authenticate
Cognito-->>-Frontend App : user data
Frontend App->>+Backend Service : check whitelisted user
Backend Service->>+Database : get whitelisted users
Database-->>-Backend Service : whitelisted users
alt Is a whitelisted admin user
User->>+Frontend App : create Round
alt A previous Round exists
Frontend App->>+Backend Service : create Round
Backend Service->>+Database : insert Round
Database-->>-Backend Service : new round
Backend Service->>+Database : duplicate Categories from last round
Backend Service->>+Database : duplicate each Category Steps from last round
Backend Service-->>-Frontend App: new Round
else
Frontend App->>+Backend Service : Create empty Round
Backend Service->>+Database : insert Round
Database-->>-Backend Service : new round
Backend Service-->>-Frontend App: new Round
end
User->>+Frontend App : create Category for new Round
Frontend App->>+Backend Service : create Category
Backend Service->>+Database : insert Category
Database-->>-Backend Service : new Category
Backend Service-->>-Frontend App: new Category
User->>+Frontend App : create Step for new Category
Frontend App->>+Backend Service : create Step
Backend Service->>+Database : insert Step
Database-->>-Backend Service : new Step
Backend Service-->>-Frontend App: new Step
end
- Node.js: v20.18
- npm: v10.7.0
- PostgreSQL: v17
- Create a Database – Set up an empty database in your local PostgreSQL instance.
- Configure Environment Variables
- Add a
.env
file in theprisma
package with the following variables:DB_URL=<local_postgresql_db_url> DB_URL_NON_POOLING=<local_postgresql_db_url_non_polling>
- Add a
.env
file in theapi
package with the following variables:NODE_ENV=development PORT=<api_port> DB_URL=<local_postgresql_db_url> DB_URL_NON_POOLING=<local_postgresql_db_url_non_polling>
- Add a
.env
file in theweb
package with the following variables:VITE_API_URL=http://localhost:<api_port>/api
- Add a
- Install Dependencies – Run the following command in the root of the project:
npm i
- Run Database Migrations – Apply database migrations using:
npm run db:migrate
- Start the Application – Launch the application with:
By default, the application will start on port 5173.
npm run dev
The application is deployed using GitHub Actions. The deployment process is triggered by pushing to the main
branch. The deployment is handled by the production.yml
workflow.
The deployment process involves the following steps:
- Install Dependencies – Installs all necessary dependencies.
- Build the Application – Builds the application for production.
- Backup the Database – Creates a backup of the current database.
- Migrate the Database – Applies any necessary database migrations.
- Deploy the Application – Deploys the application to the production environment.
- Backup Database – Before any deployment a
backup
of the database must be taken to ensure data integrity in case of any issues.- Stored in the
optimism-making-impact-production-db-backups
s3 bucket. - Named with the version and current date and time. e.g.
backup_v1.0.0-2023-09-15T12:34:56Z.sql
- Stored in the
- Open PR from
main
todevelop
– This step is for reviewing changes before deployment. - Merge PR from
main
todevelop
– This step triggers the deployment process. - Publish new Release from
main
– This step is optional but recommended for versioning and tracking changes.