GithubHelp home page GithubHelp logo

showcase_chat's Introduction

showcase_chat

A minimal chat platform template. It uses Fresh + Supabase + twind + BroadcastChannel API on Deno Deploy.

To get started, setup your .env with Supabase and Github OAuth credentials:

  • cp .env.example .env

To setup a Github OAuth App

  • Go to https://github.com/settings/applications/new
  • Set Application name to Deploy Chat Example
  • Set Homepage URL to your Deno Deploy project URL. (eg: chat-app-example.deno.dev)
  • Set Authorization callback URL to http://chat-app-example.deno.dev or localhost for development.
  • Add Client ID and Client Secret in the .env file.

Create a Supabase project

  • Go to app.supabase.io
  • Click on "New Project".
  • Enter project details and wait for the database to launch.
  • Grab the URL and anon key and DB from and add them to the .env file.

and fire up the server:

deno task start

showcase_chat's People

Contributors

bencsn avatar crowlkats avatar dsherret avatar fatfingers23 avatar hashrock avatar hyp3rflow avatar kidonng avatar littledivy avatar lucacasonato avatar piscisaureus avatar rgbkrk avatar ry avatar skuridin avatar thorwebdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

showcase_chat's Issues

logout endpoint does not work

Hello - I'm using this repo to learn Fresh and I've noticed a few issues

  1. there isn't a way to log users out easily
  2. going directly to /api/logout does not actually remove my access token from the cookies

Presence list

Add a sidebar that shows users currently online and present in the current room.
During the meeting we decided not to show people that had visited the room in the past and are currently offline.

need to referesh page for message by people from other country

Each time a person from another country sends a message I have to refresh the website to check out the new message.
This issue was not present in earlier version of the website. Kindly look it into it.For example while communicating with a person from my country I can see their messages immediately without the need to referesh my page but on the other hand while chatting with a person from another country we need to referesh it each time to check out the recent message

BroadcastChannel is not defined

Getting the following error when running locally:

An error occured during route handling or page rendering. ReferenceError: BroadcastChannel is not defined
at new RoomChannel (communication/channel.ts:12:25)

Load times are not optimal

The chat service does not lazily download all the icons, and icons are repeated due to numerical assignment.

Question regarding handler

Hi!

I can't seem to find an example in fresh docs regarding the handler used in routes/index.tsx:

export async function handler(
  req: Request,
  ctx: HandlerContext,
): Promise<Response> {
....
}

What type of handler is this? Handlers explained in the docs (data fetching, API, middleware) look a bit different.

Thanks in advance!

With best regards,
Arthur

Discussion: Why Not Websockets?

Apologies in advance if this is the wrong place to put this, I dont see a discussion section in this repo.

Is there a reason this app was implemented with server sent events instead of Websockets?

edit: I think I see why now. The browser will automatically try to reconnect to SSE streams if they are disconnected, whereas Websockets can just close. Since Deno Deploy can terminate idle instances; SSE has a more simple client side implementation because the browser will attempt to restart the EventSource. It would be perfectly viable to build this application with web sockets on Deno Deploy but the client implementation would be slightly more complex. Is my assumption correct?

Polish UI

Must-have:

  • Enter key should submit message
  • When a new message arrives, the page should scroll to the bottom

Nice to have:

  • Toast notifications

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.