A dating app that aims to match people nearby based on the time they wake up. The goal of this app is to foster a much deeper connection between matches, and increase the time surface that they can interact by matching them by their sleep schedules.
Prerequisites
Yarn
This is the package manager used in this project, additionally theworkspaces
feature is used extensively in this project, so this becomes a must.PostgreSQL
This is used as the database.Redis
(Optional) This is only used if you intend to try out using Redis for the session storage. But why?
- Clone this repository.
- Go into the directory using
cd WakieWakie
. - Install the necessary dependencies using
yarn
. - Create an empty database in
PostgreSQL
. This will be used later on for migrations, make sure to use the name of this database for theserver/.env
config. - Configure the necessary environment variables on your local machine, check the ENV section. At a minimum, you only need to configure the following environment variables in
server/.env
to be able to run the application locally.
# Database Configurations
DB_USERNAME = postgres # Database Username for Postgres (default: "postgres")
DB_PASSWORD = postgres # Password for Postgres (default: "")
DB_HOSTNAME = localhost # Hostname for Postgres (default: "localhost")
DB_DATABASE = wakiewakie # Database name for Postgres
DB_PORT = 5432 # Postgres running port (default: 5432)
- Run the migrations on the database using
yarn db:migrate
. - Run the app locally using
yarn dev
.This runs the client at
http://localhost:5173
, and the server athttp://localhost:4000
. - Open the web app on your desired browser using the URL above.
If you want to test out the server via the
Apollo GraphQL Explorer
, you can head over tohttp://localhost:4000/graphql
. Make sure to enable the cookies setting.
These are the available environment variables that are configurable for this application. You can check the .env.example
file on each directory for a quick breakdown of the environment variables.
Note: All values are inferred as strings, and are parsed appropriately in the application. For example
Port
is a string value of 4000, it is parsed to its number counterpart in the application.
Field | Values | Required | Default | Description |
---|---|---|---|---|
DB_USERNAME | string |
✅ | postgres |
Database Username for PostgreSQL |
DB_PASSWORD | string |
✅ | |
Password for PostgreSQL |
DB_HOSTNAME | string |
✅ | localhost |
Hostname for PostgreSQL |
DB_DATABASE | string |
✅ | Database name for PostgreSQL | |
DB_PORT | number |
✅ | 5432 |
Postgres running port |
PORT | number |
4000 |
Port number | |
NODE_ENV | development , test , production |
development |
Running environment of the server | |
REDIS_CONNECTION | string |
Defaults to using MemoryStore if not set instead of RedisStore |
Connection string to a Redis instance | |
CORS_ORIGIN | string |
http://localhost:4000 , http://localhost:5173 |
A list of URLs (separated by a space) that are allowed through CORS | |
SESSION_SECRET | string |
This is a secret in localhost. |
The secret used for signing sessions |
At most
REDIS_CONNECTION
,CORS_ORIGIN
, andSESSION_SECRET
will only be used for deployment.
Field | Values | Required | Default | Description |
---|---|---|---|---|
NODE_ENV | development , test , production |
development |
Running environment of the server | |
VITE_GRAPHQL_ENDPOINT | string |
http://localhost:4000/graphql |
The endpoint for GraphQL queries | |
VITE_GRAPHQL_WS_ENDPOINT | string |
ws://localhost:4000/graphql |
The endpoint for GraphQL subscription queries |
This application has been deployed over at Vercel. However, do note that Real-Time Communication
and Notifications
do not work on the deployed application. This is due to the limitations of Vercel, wherein they do not support their Serverless Functions
to act like a WebSocket Server. This means that you can only test out those functions by refreshing the page forcibly.
- Jonh Alexis Buot [Project Manager, Back-End Developer]
- Sherly Jao [Web Designer, Front-End Developer]
Unfortunately, we are not accepting pull requests, since this is a one-time project. However, feel free to fork this project, and improve on it!