Skip to content

Commit d27cc94

Browse files
committed
Update readme
1 parent 05b1416 commit d27cc94

File tree

3 files changed

+60
-50
lines changed

3 files changed

+60
-50
lines changed

.env.example

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
1-
RESEND_API_KEY=
2-
NEXT_PUBLIC_API_URL=localhost:8088
3-
GOOGLE_CLIENT_ID=
4-
GOOGLE_CLIENT_SECRET=
1+
# Rename this file to `.env` and fill in the values.
2+
3+
# Required variables for basic local functionality
4+
5+
# For database connection. A 16-character password with digits and letters.
56
SUPABASE_DB_PASSWORD=
6-
POSTHOG_KEY=
7+
8+
# For authentication.
9+
# Ask the project admin. Should start with "AIza".
710
NEXT_PUBLIC_FIREBASE_API_KEY=
11+
12+
# The URL where your local backend server is running.
13+
# You can change the port if needed.
14+
NEXT_PUBLIC_API_URL=localhost:8088
15+
16+
17+
# Optional variables for full local functionality
18+
19+
# For the location / distance filtering features.
20+
# Create a free account at https://rapidapi.com/wirefreethought/api/geodb-cities and get an API key.
821
GEODB_API_KEY=
9-
GOOGLE_APPLICATION_CREDENTIALS_DEV=
22+
23+
# For analytics like page views, user actions, feature usage, etc.
24+
# Create a free account at https://posthog.com and get a project API key. Should start with "phc_".
25+
POSTHOG_KEY=
26+
27+
# For sending emails (e.g. for user sign up, password reset, notifications, etc.).
28+
# Create a free account at https://resend.com and get an API key. Should start with "re_".
29+
RESEND_API_KEY=

README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
# Compass
77

8-
This repository provides the source code for [Compass](https://compassmeet.com), a web application where people can bond and form deep 1-on-1 relationships in a fully transparent and efficient way. It just got released—please share it with anyone who would benefit from it!
8+
This repository provides the source code for [Compass](https://compassmeet.com), a web application for people to form deep 1-on-1 relationships in a fully transparent and efficient way. And it just got released!
99

10-
To contribute, please submit a pull request or issue, or fill out this [form](https://forms.gle/tKnXUMAbEreMK6FC6) for suggestions and collaborations.
10+
**We can’t do this alone.** Whatever your skills—coding, design, writing, moderation, marketing, or even small donations—you can make a real difference. [Contribute](https://www.compassmeet.com/about) in any way you can and help our community thrive!
1111

1212
## Features
1313

@@ -18,41 +18,44 @@ To contribute, please submit a pull request or issue, or fill out this [form](ht
1818
- Open source
1919
- Democratically governed
2020

21-
The full description is available [here](https://martinbraquet.com/meeting-rational).
21+
A detailed description of the vision is available [here](https://martinbraquet.com/meeting-rational).
2222

2323
## To Do
2424

2525
- [x] Authentication (user/password and Google Sign In)
26-
- [x] Set up PostgreSQL in Production with supabase or prisma console (can stick with SQLite in dev / local)
27-
- [x] Set up hosting (vercel)
28-
- [x] Ask for detailed info per profile upon registration (intellectual interests, location, cause areas, personality type, conflict style, desired type of connection, prompt answers, gender, etc.)
26+
- [x] Set up PostgreSQL in Production with supabase
27+
- [x] Set up web hosting (vercel)
28+
- [x] Set up backend hosting (google cloud)
29+
- [x] Ask for detailed info upon registration (location, desired type of connection, prompt answers, gender, etc.)
2930
- [x] Set up page listing all the profiles
30-
- [x] Search through all the profile variables
31+
- [x] Search through most profile variables
3132
- [x] (Set up chat / direct messaging)
3233
- [x] Set up domain name (https://compassmeet.com)
3334

3435
#### Secondary To Do
3536

3637
Any action item is open to anyone for collaboration, but the following ones are particularly easy to do for first-time contributors.
3738

39+
- [ ] Add profile features (intellectual interests, cause areas, personality type, conflict style, etc.)
40+
- [ ] Add filters to search through remaining profile features (politics, religion, education level, etc.)
41+
- [ ] Cover with tests (very important, just the test template and framework are ready)
3842
- [ ] Clean up terms and conditions
3943
- [ ] Clean up privacy notice
40-
- [ ] Clean up learn more page
44+
- [x] Clean up learn more page
4145
- [x] Add dark theme
42-
- [ ] Cover with tests (almost nothing is covered right now)
4346

4447
## Implementation
4548

46-
The web app is coded in Typescript using React as front-end and Prisma as back-end. It includes:
49+
The web app is coded in Typescript using React as front-end. It includes:
4750

48-
- [NextAuth.js v4](https://next-auth.js.org/)
49-
- [Prisma Postgres](https://www.prisma.io/postgres)
50-
- [Prisma ORM](https://www.prisma.io/orm)
51-
- Vercel
51+
- [Supabase](https://supabase.com/) for the PostgreSQL database
52+
- [Google Cloud](https://console.cloud.google.com) for hosting the backend API
53+
- [Firebase](https://firebase.google.com/) for authentication and media storage
54+
- [Vercel](https://vercel.com/) for hosting the front-end
5255

5356
## Development
5457

55-
Below are all the steps to contribute. If you have any trouble or questions, please don't hesitate to open an issue or contact us on [Discord](https://discord.gg/8Vd7jzqjun)!
58+
Below are all the steps to contribute. If you have any trouble or questions, please don't hesitate to open an issue or contact us on [Discord](https://discord.gg/8Vd7jzqjun)! We're responsive and happy to help.
5659

5760
### Installation
5861

@@ -66,33 +69,30 @@ Install `opentofu`, `docker`, and `yarn`. Try running this on Linux or macOS for
6669
```bash
6770
./setup.sh
6871
```
72+
If it doesn't work, you can install them manually (Google how to install `opentofu`, `docker`, and `yarn` for your OS).
6973

70-
Install the dependencies:
74+
Then, install the dependencies for this project:
7175
```bash
7276
yarn install
7377
```
7478

7579
### Environment Variables
7680

77-
Configure your database connection via an environment variable. Create an `.env` file:
78-
```bash
79-
cp .env.example .env
80-
```
81+
We can't make the following information public, for security and privacy reasons:
82+
- Database, otherwise anyone could access all the user data (including private messages)
83+
- Firebase, otherwise anyone could remove users or modify the media files
84+
- Email, analytics, and location services, otherwise anyone could use our paid plan
8185

82-
To ensure your authentication works properly, you'll also need to set the `AUTH_SECRET`. You can generate such a random 32-character string with:
83-
```bash
84-
npx auth secret
85-
```
86+
So, for your development, we will give you user-specific access when possible (e.g., Firebase) and for the rest you will need to set up cloned services (email, locations, etc.) and store your secrets as environment variables.
8687

87-
In the end, your `.env` file should look similar to this (but using _your own values_ for the secret):
88+
To do so, simply create an `.env` file as a copy of `.env.example`, open it, and fill in the variables according to the instructions in the file:
8889
```bash
89-
DATABASE_URL="postgresql://postgres:password@localhost:5432/compass"
90-
AUTH_SECRET="gTwLSXFeNWFRpUTmxlRniOfegXYw445pd0k6JqXd7Ag="
90+
cp .env.example .env
9191
```
9292

9393
### Installing PostgreSQL
9494

95-
Run the following commands to set up your local development database and Prisma schema. Run only the section that corresponds to your operating system.
95+
Run the following commands to set up your local development database. Run only the section that corresponds to your operating system.
9696

9797
On macOS:
9898
```bash
@@ -120,9 +120,7 @@ ALTER USER postgres WITH PASSWORD 'password';
120120

121121
Create the database
122122
```bash
123-
npx prisma generate
124-
npx prisma db push
125-
npx prisma db seed
123+
...
126124
```
127125
Note that your local database will be made of synthetic data, not real users. This is fine for development and testing.
128126

@@ -132,6 +130,7 @@ Make sure the tests pass:
132130
```bash
133131
yarn test
134132
```
133+
TODO: fix tests
135134

136135
### Running the Development Server
137136

docs/development.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,12 @@
44

55
To add a profile variable (personality type, etc.), make modifications here:
66

7-
* [schema.prisma](../prisma/schema.prisma)
8-
* [seed.ts](../prisma/seed.ts)
9-
* [profile.tsx](../lib/client/profile.tsx)
10-
* [schema.ts](../lib/client/schema.ts)
11-
* [page.tsx](../app/complete-profile/page.tsx)
12-
* [page.tsx](../app/profiles/page.tsx)
13-
* [ProfileFilters.tsx](../app/profiles/ProfileFilters.tsx)
14-
* [route.ts](../app/api/profiles/route.ts)
15-
* [route.ts](../app/api/profiles/%5Bid%5D/route.ts)
16-
* [route.ts](../app/api/user/update-profile/route.ts)
17-
18-
Then update the database:
7+
* ...
8+
9+
Then update the database by running a migration:
1910

2011
```bash
21-
npx prisma migrate dev --name add-some-profile-variable
12+
...
2213
```
2314

2415
### Cover with tests

0 commit comments

Comments
 (0)