This project is currently in development :rocket:
Welcome to Groupy, a social networking platform designed to bring together individuals with shared interests, whether you're looking for a workout buddy, a study group, or a team to work on exciting projects. Groupy aims to make it easy for you to find and connect with others who share your passions.
Groupy is built using the following technologies:
packages/db_prisma
: Contains Prisma ORM which is used to talk to PostgreSQL database.packages/db_redis
: Contains Dockerfile to run Redis instance locally.packages/supabase-suite
: Contains supabase config to run supabase in docker locally.apps/chatServer
: This folder contains the chat server which is runs on express and socket.io. apps/chatServer/utils
: Consists of utility functions for chatServer.apps/groupy/src/pages
: This directory contains the Next.js pages used to structure the application's frontend.apps/groupy/src/components
: Inside this folder, you'll find the components that are utilized within the pages located in src/pages
.apps/groupy/public
: This directory holds SVG files converted into TypeScript (tsx) files, as well as the fonts used throughout Groupy. It serves as a repository for static assets accessible to both the frontend and the backend.apps/groupy/src/common
: Contains a collection of functions that are shared between both the frontend and the backend for Groupy.apps/groupy/src/utils
: Consists of utility functions for Groupy.apps/groupy/src/store
: Contains Recoil states, which help manage the state of the React components efficiently.apps/groupy/src/server
: This directory is dedicated to the backend for Groupy. It contains backend APIs and a Prisma connector for interacting with the database. Server logic and API endpoints are implemented here.apps/groupy/prisma
: This folder contains Prisma migrations and a schema.prisma file. The schema.prisma file serves as the blueprint for the database models, defining their structure and relationships.So far, the following features have been implemented in Groupy:
There are exciting features in the pipeline to enhance Groupy further:
There are two ways you can run Groupy on your machine. Choose the one which suits you the most.
Setup Method 1 : Local Groupy with your database environment variables To run Groupy locally, follow these steps:
Clone the repository.
Install the required dependencies using npm install
.
Run the command turbo db:generate
to generate Prisma Client.
Rename the env.example
file to .env
.
Add the following keys and replace the values with your own:
DATABASE_URL
with your postgresql database urlYOUR_NEXTAUTH_URL
with the URL of your Next.js application where NextAuth should handle authentication.YOUR_NEXTAUTH_SECRET
with a random secret key for NextAuth. You can generate one using a tool like openssl rand -hex 32
.YOUR_SUPABASE_PROJECT_URL
with the URL of your Supabase project.YOUR_SUPABASE_PROJECT_ANON_KEY
with the anonymous key for your Supabase project.Requirements for chat-server
NEXT_PUBLIC_CHATSERVER_URL
with the URL where chat-server
is running at (For development : http://localhost:4000
).REDIS_PORT
with port of your redis server.REDIS_HOST
with host data of your redis server.REDIS_PASSWORD
with the password of your redis server.CS_PORT
with the PORT number where you want to run your chat-server.Run database migrations using npm run prisma-migrate
.
Run the development server using npm run dev
.
Setup Method 2 : Local Groupy with Docker database Setup
npm install
.turbo db:generate
to generate Prisma Client.npm run dev-local
, this may take sometime to setup. (Note: This step utilizes .env.test file for environment variables instead of .env)To run E2E test locally you can simply run these commands in order:
NOTE: Ensure Docker is running in the background. This allows Groupy to set up local instances of Supabase and Redis and use the .env.test
file for configuration.
npm run dev-local
: This command ensures you are running all the databases and storages locally on docker and also starts Groupy dev instance locally.npm run e2e-groupy
: Runs cypress tests.If you are adding tests and want to open cypress dev environment, simply run npm run e2e-groupy-dev
instead of step 2 above.
You can start or stop database instances using the following command:
npm run db-up
: Starts Supabase and redis services on docker.npm run db-down
: Stops Supabase and redis services on docker.Warning: Running npm run e2e-groupy
will work but it also generates new data in databases which might be unwanted. It is best to use the local instances for this purpose which you can run by following step 1.
Contributions to Groupy are welcome! If you'd like to contribute to the project, follow these steps:
Groupy is licensed under the MIT License, which allows you to use, modify, and distribute the code freely.
Thank you for considering Groupy! Let's build a community where people can connect and thrive together. If you have any questions or feedback, please don't hesitate to reach out. Happy coding!