Skip to content

RedBit-devs/RedBit

Repository files navigation

NPM Nuxtjs Prisma

RedBit

The documentation for users can be found at the repositories wiki page

This project was made as a project for school.

Goals

We aim to make a fully open source chat. With minimal data collection, and being fully transparent about that minimal data towards the user. We believe that everyone who uses a program should be given the opportunity to modify the software they use. (or contribute to the main project)

Starter

Look at the Nuxt documentation to learn more.

Setup

Make sure to install dependencies:

npm install

Development Server

Start the development server on http://localhost:3000:

npm run dev

Production

Build the application for production:

Warning: There should be no spaces in the filepath when building

npm run build

Locally preview production build:

npm run preview

Check out the deployment documentation for more information.

Development

The documentation for the API can be found in the user documentation on the wiki page

Components

It is used for displaying information in a card form on the landingpage. For the "picture" eather an icon or an image can be provided. To use an icon you must start it with icon:

Picture

kép kép

Props

"cardData": {
        type: Object as PropType<CardData>
    }

Types

type CardData = {
  imageUrl?: string;
  headerText?: string;
  bubbles?: Bubble[];
  description?: string;
};
type Bubble = {
  url: string;
  name: string;
  imageUrl: string;
};
Picture

kép

#### Props ```js 'name': { type: String }, 'picture': { type: String, default: "" }, 'activity': { type: String, default: "" } ```

used for displaying messages sent.

Props

authorImage: {
    type: String,
    required: true,
    default: ""
},
authorName: {
    type: String,
    required: true
},
message: {
    type: String,
    required: true
},

The input field whre the user can type in thier messages and send them to other users or to a chat room.

Props

  "send": {
    type: Function,
    default: () => { }
  },
  "route": {
    type: String,
    default: ""
  }

It's a dialog what the user can open by clicking on it's friend's user name. It shows some informaiton abaout the profile what the user clicked on. The user can navigate between four pages where it can see the common servers or friends and can manage the friendship.

Props

    closeDialogFunc: {
        type: Function,
        default: () => { }
    },

    isDialogOpen: {
        type: Boolean,
        default: ref(false)
    }

It's a modal where the user can create it's own serever what opens up after the user clicked the create server button.

Props

 isShown: {
    type: Boolean,
    default: false,
  },
  closeDialogFunc: {
    type: Function,
    default: () => { },
  }

Database

For the database we use prisma.io ORM. The database schema can be found in the projects root folder /prisma/schema.prisma

External

Hosting

For production, after building the project successfully the builded files can be found at .output/server/index.mjs. It can be run with node

node .output/server/index.mjs

ENV

An example for the env is found in the projects root directory.

  • DATABASE_URL

    • A connection string for the database used
    • Can use connection pooling
  • DIRECT_URL

    • Direct connection to the database. Used for migrations.
    • A connection string for the database used
    • Do not use connection pooling
  • JWT_SECRET

    • JWT token encription key
  • NUXT_NODEMAILER_FROM

    • Email address used for sending emails to the user
  • NUXT_NODEMAILER_AUTH_PASS

    • Mailing secret

SMTP server provider used

About

This project is made for da school

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •