Giter VIP home page Giter VIP logo

only-now's Introduction

OnlyNow

OnlyNow

A simple chat app that allows you to chat with people who are online in the same room as you.

Supabase Launch Week X Hackathon

This project was built for the Supabase Launch Week X Hackathon.

We are Finn and Yumi.

Roadmap

After successful initial release, the following features are planned:

  • End-to-end encryption
  • Optional user authentication
  • Mobile app

For a detailed information about the roadmap, please refer to the project board.

If you like this project, please support us by leaving a star on this repo!!

Stack

The app is built with the following technologies:

Supabase Backend

Database

There is only one table in the database, room, which is defined as follows:

create table
  public.room (
    id uuid not null default gen_random_uuid (),
    created_at timestamp with time zone not null default now(),
    private boolean not null default true,
    online_members uuid[] null,
    creator uuid null,
    room_code text null,
    constraint room_pkey primary key (id)
  ) tablespace pg_default;

Row Level Security (RLS) is not defined to not allow any direct interactions with the database by the clients. Instead, all interactions are done through the Edge Functions.

Edge Functions

All edge functions are defined in the supabase/functions directory and are hosted on Supabase.

Cron Jobs

Install the pg_cron extension on Supabase and run the following SQL query to schedule the cron job to clean up old rooms every three hours:

select cron.schedule(
  'cleanup-of-old-rooms',
  '0 */3 * * *', -- Every three hours
  $$ delete from shortlinks where created_at < now() - interval '3 hours' $$
)

License

This project is licensed under the MIT License - see the LICENSE file for details. The project is fully open source, and we welcome contributions from the community.

only-now's People

Contributors

finnthompson avatar izyuumi avatar

Stargazers

 avatar  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.