Giter Site home page Giter Site logo

laplacexd / wakiewakie Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.5 MB

A dating app wherein you get matched by people that woke up as the same time as you.

License: GNU General Public License v3.0

JavaScript 2.17% Shell 0.06% HTML 0.41% TypeScript 96.88% CSS 0.47%
dating-app vite graphql graphql-client graphql-codegen graphql-server real-time typescript websocket

wakiewakie's Introduction

WakieWakie

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.

Setup

Prerequisites

  • Yarn This is the package manager used in this project, additionally the workspaces 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?
  1. Clone this repository.
  2. Go into the directory using cd WakieWakie.
  3. Install the necessary dependencies using yarn.
  4. Create an empty database in PostgreSQL. This will be used later on for migrations, make sure to use the name of this database for the server/.env config.
  5. 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)
  1. Run the migrations on the database using yarn db:migrate.
  2. Run the app locally using yarn dev.

    This runs the client at http://localhost:5173, and the server at http://localhost:4000.

  3. 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 to http://localhost:4000/graphql. Make sure to enable the cookies setting.

ENV

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.

Variables for server/.env

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, and SESSION_SECRET will only be used for deployment.

Variables for client/.env

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

Deployment

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.

Authors and Acknowledgement

Contributing

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!

License

GNU General Public License v3.0

wakiewakie's People

Contributors

laplacexd avatar jaosherlyr avatar

Stargazers

Caleb Forestal |  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.