5.3 KiB
Compass
This repository provides the source code for Compass, 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!
To contribute, please submit a pull request or issue, or fill out this form for suggestions and collaborations.
Features
- Extremely detailed profiles for deep connections
- Radically transparent: user base fully searchable
- Free, ad-free, not for profit (supported by donations)
- Created, hosted, maintained, and moderated by volunteers
- Open source
- Democratically governed
The full description is available here.
To Do
- Authentication (user/password and Google Sign In)
- Set up PostgreSQL in Production with supabase or prisma console (can stick with SQLite in dev / local)
- Set up hosting (vercel)
- 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.)
- Set up page listing all the profiles
- Search through all the profile variables
- (Set up chat / direct messaging)
- Set up domain name (https://compassmeet.com)
Secondary To Do
Any action item is open to anyone for collaboration, but the following ones are particularly easy to do for first-time contributors.
- Clean up terms and conditions
- Clean up privacy notice
- Clean up learn more page
- Add dark theme
- Cover with tests (almost nothing is covered right now)
Implementation
The web app is coded in Typescript using React as front-end and Prisma as back-end. It includes:
Development
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!
Installation
Clone the repo and navigating into it:
git clone git@github.com:CompassMeet/Compass.git
cd Compass
Install opentofu, docker, and yarn. Try running this on Linux or macOS for a faster install:
./setup.sh
Install the dependencies:
yarn install
Environment Variables
Configure your database connection via an environment variable. Create an .env file:
cp .env.example .env
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:
npx auth secret
In the end, your .env file should look similar to this (but using your own values for the secret):
DATABASE_URL="postgresql://postgres:password@localhost:5432/compass"
AUTH_SECRET="gTwLSXFeNWFRpUTmxlRniOfegXYw445pd0k6JqXd7Ag="
Installing PostgreSQL
Run the following commands to set up your local development database and Prisma schema. Run only the section that corresponds to your operating system.
On macOS:
brew install postgresql
brew services start postgresql
On Linux:
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql
On Windows, you can download PostgreSQL from the official website.
Database Initialization
Create a database named compass and set the password for the postgres user:
sudo -u postgres psql
ALTER USER postgres WITH PASSWORD 'password';
\q
Create the database
npx prisma generate
npx prisma db push
npx prisma db seed
Note that your local database will be made of synthetic data, not real users. This is fine for development and testing.
Tests
Make sure the tests pass:
yarn test
Running the Development Server
Start the development server:
yarn dev
Once the server is running, visit http://localhost:3000 to start using the app. You can sign up and visit the profiles; you should see 5 synthetic profiles.
Now you can start contributing by making changes and submitting pull requests!
See development.md for additional instructions, such as adding new profile features.
Acknowledgements
This project is built on top of manifold.love, an open-source dating platform licensed under the MIT License. We greatly appreciate their work and contributions to open-source, which have significantly aided in the development of some core features such as direct messaging, prompts, and email notifications. We invite the community to explore and contribute to other open-source projects like manifold.love as well, especially if you're interested in functionalities that deviate from Compass' ideals of deep, intentional connections.