Skip to content

Commit

Permalink
Format with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn committed Jun 29, 2024
1 parent 1c85400 commit 0c24504
Show file tree
Hide file tree
Showing 568 changed files with 18,316 additions and 15,305 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/sweep-template.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Sweep Issue
title: 'Sweep: '
title: "Sweep: "
description: For small bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer.
labels: sweep
body:
Expand All @@ -19,4 +19,4 @@ body:
label: Branch
description: The branch to work off of (optional)
placeholder: |
main
main
6 changes: 3 additions & 3 deletions .github/workflows/generate_embeddings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'generate_embeddings'
name: "generate_embeddings"
on: # run on main branch changes
push:
branches:
Expand All @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: supabase/[email protected] # Find the latest version in the Marketplace
with:
supabase-url: 'https://scqhjglwdranqzljqesd.supabase.co'
supabase-url: "https://scqhjglwdranqzljqesd.supabase.co"
supabase-service-role-key: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
openai-key: ${{ secrets.OPENAI_API_KEY }}
docs-root-path: 'public/docs' # the path to the root of your md(x) files
docs-root-path: "public/docs" # the path to the root of your md(x) files
12 changes: 6 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"WillLuke.nextjs.addTypesOnSave": true,
"WillLuke.nextjs.hasPrompted": true,
"files.associations": {
"*.mdx": "markdown"
}
}
"WillLuke.nextjs.addTypesOnSave": true,
"WillLuke.nextjs.hasPrompted": true,
"files.associations": {
"*.mdx": "markdown"
}
}
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wishocracy: A Decentralized To-Do List for Humanity

**Wishocracy** is a decentralized, modular and interoperable protocol for optimally allocating societal resources to maximize universal wish fulfillment using collective intelligence. It's meant to be a general-purpose system to be used by any organization like nonprofits, DAOs, businesses, etc.
**Wishocracy** is a decentralized, modular and interoperable protocol for optimally allocating societal resources to maximize universal wish fulfillment using collective intelligence. It's meant to be a general-purpose system to be used by any organization like nonprofits, DAOs, businesses, etc.

**Wishonia** is an imaginary magical kingdom meant to illustrate the concept of Wishocracy and test the idea in a simulated virtual world to see how it works.

Expand Down Expand Up @@ -31,10 +31,10 @@ pnpm install
5. **Seed the Database**:

Seed the database with default problems and wishes by running tests/seed.test.ts with the following command:

```sh
jest tests/seed.test.ts
```

```

# Why Are You Doing This?

Expand Down Expand Up @@ -68,7 +68,7 @@ This is visually represented in the graphs, where each additional person signifi

![](public/img/coordination-complexity-exponential-graph.jpeg)

However, digital twin AI agents, which are AI representations of individuals with higher cognitive bandwidth perfectly aligned to their preferences, can mitigate this issue. These agents can process vast amounts of information and make decisions more efficiently, acting on behalf of their human counterparts.
However, digital twin AI agents, which are AI representations of individuals with higher cognitive bandwidth perfectly aligned to their preferences, can mitigate this issue. These agents can process vast amounts of information and make decisions more efficiently, acting on behalf of their human counterparts.

By integrating these AI agents into a Global Todo List for humanity, we can streamline the coordination of efforts towards shared societal goals. These agents can continuously analyze data, predict outcomes, and suggest optimal actions, ensuring that resources are allocated effectively and that collaborative efforts are maximized. This approach can lead to more informed decision-making, reduced friction in communication, and accelerated progress towards achieving our collective objectives on a global scale.

Expand Down Expand Up @@ -127,7 +127,7 @@ The core components of a Wish Fulfillment System are:
3. **Solutions**: A comprehensive list of proposed solutions to solve each problem or realize each wish.
It's also necessary to consider the cost-effectiveness of each solution and unintended side effects.
A solution may solve multiple problems or create new problems.
4. **Tasks**: A list of SMART (Specific, Measurable, Achievable, Relevant, Time-bound) tasks that need to be completed to implement each solution. Some tasks may contribute to multiple solutions.
4. **Tasks**: A list of SMART (Specific, Measurable, Achievable, Relevant, Time-bound) tasks that need to be completed to implement each solution. Some tasks may contribute to multiple solutions.
5. **Solvers**: People/organizations responsible for completing each task.
6. **Progress**: Tracking the impact of each solution and adjusting resource allocation as needed.
7. **Results**: The outcomes of each solution and the overall positive and negative impact on society.
Expand All @@ -144,8 +144,8 @@ Determine how much of our scarce resources should be allocated to solving each p

There are a number of ways to do this like democracy and crowdfunding campaigns but they suffer from various limitations:

- **Representative Democracy:** The interests of representatives do not match the interests of all citizens. Additionally, representatives have limited knowledge and cognitive capacity to effectively weigh the relative importance of thousands of wishes.
- **Crowdfunding Campaigns:** People vote with their dollars to determine the allocation of resources. However, again humans have limited cognitive capacity to effectively weigh the relative importance of thousands of wishes.
- **Representative Democracy:** The interests of representatives do not match the interests of all citizens. Additionally, representatives have limited knowledge and cognitive capacity to effectively weigh the relative importance of thousands of wishes.
- **Crowdfunding Campaigns:** People vote with their dollars to determine the allocation of resources. However, again humans have limited cognitive capacity to effectively weigh the relative importance of thousands of wishes.

### Aggregated Pairwise Preference Allocation (APPA)

Expand Down Expand Up @@ -199,7 +199,7 @@ Evaluate the completed tasks to determine if they meet the criteria for completi
Track the impact of each solution.
Evaluate the outcomes of each solution and the overall positive and negative impact on society.

## Step 8. Feedback and Iterative Improvement
## Step 8. Feedback and Iterative Improvement

Provide impact data to people making pairwise allocations to help them make better decisions in the future.
This will enable continuous improvement in the allocation of resources to maximize wish fulfillment.
Expand Down Expand Up @@ -317,7 +317,7 @@ By defining these common primitives and leveraging decentralized data networks,
2. **Budget Allocation System**: A system for determining how much of our scarce resources should be allocated to solving each problem or fulfilling each wish.
3. **Solution Management System**: A system for creating, categorizing, and evaluating proposed solutions to solve each problem or fulfill each wish.
4. **Task Management System**: A system for decomposing each solution into a list of atomic tasks that need to be completed.
5. **Wisher Relationship Management (WRM) System**: A system for tracking the relationship between wishes, solutions, tasks, and wishers. This is similar to a Customer Relationship Management (CRM) system but for global coordination between Wishers.
5. **Wisher Relationship Management (WRM) System**: A system for tracking the relationship between wishes, solutions, tasks, and wishers. This is similar to a Customer Relationship Management (CRM) system but for global coordination between Wishers.

# Digital Twins

Expand Down Expand Up @@ -362,7 +362,7 @@ The basic technical ingredients of a digital twin are:

# Frequently Asked Questions

## Q: Isn't this insanely over-ambitious? Why not just focus on smaller focused goals?
## Q: Isn't this insanely over-ambitious? Why not just focus on smaller focused goals?

The goal is to minimize wasted duplication of effort to optimize societal resource allocation.
By limiting its scope to small organizations, it would not be able to prevent duplication of effort on a global scale.
Expand All @@ -382,22 +382,22 @@ The key potential benefits of a global, decentralized todo list are:
1. **Preventing Waste** - Minimizing duplicated effort by surfacing what problems/wishes people are already working on solving. This allows resources to be allocated more efficiently. Governments and charitable foundations spend billions on solving important problems, but lack of coordination often leads to significant duplication of effort. For instance, if two research organizations each spend $1 million doing animal trials on the same drug, that's effectively $1 million of funding wasted and lots of extra animals suffering for no reason.

2. **Information** - In democracies, representatives are supposed to do what people want.
But how can they do that if we don't have a system to create a budget that illustrates what everyone wants?
[Aggregated Pairwise Preference Allocation](#aggregated-pairwise-preference-allocation-appa) is a unique way to quantify what everyone wants.
Thus, just having this information available to representatives would actually make it possible for representatives to do what people want.
But how can they do that if we don't have a system to create a budget that illustrates what everyone wants?
[Aggregated Pairwise Preference Allocation](#aggregated-pairwise-preference-allocation-appa) is a unique way to quantify what everyone wants.
Thus, just having this information available to representatives would actually make it possible for representatives to do what people want.

3. **Coordination and Cost-Sharing** -
By decomposing solutions into atomic tasks
that anyone can contribute to, it enables cost-sharing between organizations that need the same thing.
This would enable all organizations to accomplish more with the same amount of resources.
This would enable all organizations to accomplish more with the same amount of resources.

4. **Helping People Maximize Their Impact** - Say you're a charitable individual who wants to improve the world. How can you figure out what the most important thing you can do A global decentralized to do list could help charitable people find the highest impact tasks to work on given their skills and resources.
4. **Helping People Maximize Their Impact** - Say you're a charitable individual who wants to improve the world. How can you figure out what the most important thing you can do A global decentralized to do list could help charitable people find the highest impact tasks to work on given their skills and resources.

5. **Iterative Improvement through Impact Tracking** - Iteratively improving allocation of resources over time by feeding impact data back into the prioritization process. The system gets smarter.
5. **Iterative Improvement through Impact Tracking** - Iteratively improving allocation of resources over time by feeding impact data back into the prioritization process. The system gets smarter.

The key is to start with small-scale experiments and grow gradually,
while maintaining the north star of empowering individuals to self-organize to solve important problems,
augmenting rather than replacing existing institutions.
The key is to start with small-scale experiments and grow gradually,
while maintaining the north star of empowering individuals to self-organize to solve important problems,
augmenting rather than replacing existing institutions.

## Q: Even if we had a global to-do list, we need every organization to use it for it to be useful. How will we make it so that every organization decides to use it?

Expand Down
10 changes: 5 additions & 5 deletions __checks__/api.check.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ApiCheck, AssertionBuilder } from 'checkly/constructs'
import { ApiCheck, AssertionBuilder } from "checkly/constructs"

new ApiCheck('global-problems-api-check-1', {
name: 'Global Problems API',
new ApiCheck("global-problems-api-check-1", {
name: "Global Problems API",
alertChannels: [],
degradedResponseTime: 10000,
maxResponseTime: 20000,
request: {
url: 'https://wishonia.love/api/globalProblems',
method: 'GET',
url: "https://wishonia.love/api/globalProblems",
method: "GET",
followRedirects: true,
skipSSL: false,
assertions: [
Expand Down
23 changes: 13 additions & 10 deletions __checks__/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
* To learn more about Playwright Test visit:
* https://www.checklyhq.com/docs/browser-checks/playwright-test/
*/
import {expect, test} from '@playwright/test'
import { expect, test } from "@playwright/test"

if(process.env.VERCEL_BYPASS_TOKEN) {
console.log('Using Vercel bypass token')
if (process.env.VERCEL_BYPASS_TOKEN) {
console.log("Using Vercel bypass token")
test.use({
extraHTTPHeaders: {
'x-vercel-protection-bypass': process.env.VERCEL_BYPASS_TOKEN
}
"x-vercel-protection-bypass": process.env.VERCEL_BYPASS_TOKEN,
},
})
} else {
console.error('=== NO VERCEL_BYPASS_TOKEN FOUND!!! ===')
console.error("=== NO VERCEL_BYPASS_TOKEN FOUND!!! ===")
}

test('visit page and take screenshot', async ({ page }) => {
test("visit page and take screenshot", async ({ page }) => {
// If available, we set the target URL to a preview deployment URL provided by the ENVIRONMENT_URL created by Vercel.
// Otherwise, we use the Production URL.
const targetUrl = process.env.ENVIRONMENT_URL || 'https://wishonia.love/'
const targetUrl = process.env.ENVIRONMENT_URL || "https://wishonia.love/"

// We visit the page. This waits for the "load" event by default.
const response = await page.goto(targetUrl)
Expand All @@ -43,8 +43,11 @@ test('visit page and take screenshot', async ({ page }) => {
if (response === null) {
throw new Error(`Could not load ${targetUrl}`)
}
expect(response.status(),'should respond with correct status code').toBeLessThan(400)
expect(
response.status(),
"should respond with correct status code"
).toBeLessThan(400)

// Take a screenshot
await page.screenshot({ path: '__checks__/screenshots/screenshot.jpg' })
await page.screenshot({ path: "__checks__/screenshots/screenshot.jpg" })
})
24 changes: 14 additions & 10 deletions __checks__/wishonia.check.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
/**
* This is a Checkly CLI BrowserCheck construct. To learn more, visit:
* - https://www.checklyhq.com/docs/cli/
* - https://www.checklyhq.com/docs/cli/constructs-reference/#browsercheck
*/
* This is a Checkly CLI BrowserCheck construct. To learn more, visit:
* - https://www.checklyhq.com/docs/cli/
* - https://www.checklyhq.com/docs/cli/constructs-reference/#browsercheck
*/

import { BrowserCheck, Frequency, RetryStrategyBuilder } from 'checkly/constructs'
import {
BrowserCheck,
Frequency,
RetryStrategyBuilder,
} from "checkly/constructs"

new BrowserCheck('wishonia', {
name: 'wishonia',
new BrowserCheck("wishonia", {
name: "wishonia",
activated: true,
muted: false,
shouldFail: false,
runParallel: false,
locations: ['us-east-2', 'us-east-1'],
locations: ["us-east-2", "us-east-1"],
tags: [],
sslCheckDomain: '',
sslCheckDomain: "",
frequency: Frequency.EVERY_24H,
environmentVariables: [],
code: {
entrypoint: './homepage.spec.ts',
entrypoint: "./homepage.spec.ts",
},
retryStrategy: RetryStrategyBuilder.fixedStrategy({
baseBackoffSeconds: 0,
Expand Down
4 changes: 3 additions & 1 deletion app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function Signin() {
</Link>
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div className="flex flex-col space-y-2 text-center">
<h1 className="text-2xl font-semibold tracking-tight">Welcome to Wishonia</h1>
<h1 className="text-2xl font-semibold tracking-tight">
Welcome to Wishonia
</h1>
<p className="text-sm text-muted-foreground">
Please verify your identity to enter the magical kingdom!
</p>
Expand Down
7 changes: 4 additions & 3 deletions app/(frontpage)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react"

import { getCurrentUser } from "@/lib/session"
import Footer from "@/components/layout/footer"
import TopNavbar from "@/components/layout/topNavbar"
import React from "react";

interface FrontPageLayoutProps {
children: React.ReactNode
Expand All @@ -23,8 +24,8 @@ export default async function FrontPageLayout({
/>
)}
{children}
<div style={{ height: '200px' }}></div>
<div style={{ height: "200px" }}></div>
<Footer />
</>
)
}
}
20 changes: 10 additions & 10 deletions app/(frontpage)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { getCurrentUser } from "@/lib/session"
import FeatureCards from "@/components/pages/feature-cards"
import Hero from "@/components/pages/hero"
import OpenSource from "@/components/pages/opensource"
import { PollRandomGlobalProblems } from "@/components/poll-random-global-problems"
import { PWARedirect } from "@/components/pwa-redirect"
import {getCurrentUser} from "@/lib/session";
import {PollRandomGlobalProblems} from "@/components/poll-random-global-problems";

export default async function Home() {
const user = await getCurrentUser()
return (
<main>
<Hero />
<PollRandomGlobalProblems user={user} />
const user = await getCurrentUser()
return (
<main>
<Hero />
<PollRandomGlobalProblems user={user} />
<FeatureCards />
<OpenSource />
<PWARedirect/>
</main>
)
<PWARedirect />
</main>
)
}
6 changes: 2 additions & 4 deletions app/[referrerId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getCurrentUser } from "@/lib/session"
import { Shell } from "@/components/layout/shell"
import ReferrerCapture from "@/components/ReferrerCapture";
import ReferrerCapture from "@/components/ReferrerCapture"

interface ReferrerPageProps {
params: { referrerId: string }
Expand All @@ -13,11 +13,9 @@ export default async function ReferrerPage({
}: ReferrerPageProps) {
const user = await getCurrentUser()



return (
<Shell>
<ReferrerCapture referrerId={params.referrerId} />
<ReferrerCapture referrerId={params.referrerId} />
</Shell>
)
}
Loading

0 comments on commit 0c24504

Please sign in to comment.