Skip to content

bennischober/bookingium

Repository files navigation

Bookingium - Event booking

Core functionality

  • Invoice PDF generation
  • Contract PDF generation
  • DEAL MEMO generation

Needed for core functionality

  • database with data: user, band, company, location, hotel, promoter, event
  • Excel/CSV import for data
  • 4 Forms to input data: band (with optional company), location (including event?, with optional company), hotel, promoter (with optional company)

New semi core functionality

  • Newsletter lists with sending newsletters
  • database collection newsletter (to be precise: 2 collections: emails {array newsletterid, email, name, ?salution} and newsletter => {name, content, newsletterid})
  • input form for newsletter (emails, newsletter data)
  • Address book (like in Outlook) => can save lopros, companies, "normal" people (=> export/import function; think about more functionality for this one)

Database

Data models

Note: Might save names (only company/hotel?) as toLowerCase() and also treat input as lower case (will be much easier to use) OR use lower case on query (would make more sense)

User | SignIn

{
  "userid": string,
  "name": string,
  "email": string,
  "password" string,
  "log": {
    "created": string | Date,
    "lastLogin": string | Date,
  }
}

might need to be renamed to cpuser (company user)

Ideas:

  • array of users and signin via dynamic login route with companyid
  • or like atlassian: just a normal signin but a user references a company (optional) and is validated after sign in

For future (data structure):

  • add payment information to user
  • add company, phone numbers, address, payment information, etc.

Deal memo

Note: By far the most important

{
  "dealid": string,
  "date": string,
  "deal": string,
  "fee": number,
  "ticketPriceVVK": number,
  "ticketPriceAK": number,
  "posters": number,
  "status": string,
  "notes": string,
  "bandid": string,
  "venueid": string,
  "loproid": string,
  "hotelid": string,
  "dm": {
    "userid": string,
    "created": string | Date,
    "edited": string,
  }
}

Band

{
  "bandid": string,
  "name": string,
  "notes": string,
  "company": {
    "name": string,
    "vatNumber": string,
    "ustNumber": string,
    "address": {
      "streetNumber": string,
      "street": string,
      "addressSuffix": string,
      "zipCode": number,
      "city": string,
      "state": string,
      "country:" string,
      "countryCode": string,
    },
    "contact": {
      "email": string,
      "phone": string,
      "mobilePhone": string,
      "homepage": string,
    },
  },
  "members": [
    {
      "name": string,
      "email": string,
      "phone": string
    }
  ],
  "dm": {
    "userid": string,
    "created": string | Date,
    "edited": string,
  }
}

Venue

{
  "venueid": string,
  "venue": string,
  "capacity": number,
  "notes": string,
  "company": {
    "name": string,
    "vatNumber": string,
    "ustNumber": string,
    "address": {
      "street": string,
      "streetNumber": string,
      "addressSuffix": string,
      "zipCode": number,
      "city": string,
      "state": string,
      "country:" string,
      "countryCode": string,
    },
    "contact": {
      "phone": string,
      "mobilePhone": string,
      "email": string,
      "homepage"?: string,
    },
  },
  "dm": {
    "userid": string,
    "created": string | Date,
    "edited": string,
  }
}

Lopro (Local Promoter)

{
  "loproid": string,
  "name": string,
  "phone": string,
  "mobilePhone": string,
  "email": string,
  "notes": string,
  "company": {
    "name": string,
    "vatNumber": string,
    "ustNumber": string,
    "address": {
        "street": string,
        "streetNumber": string,
        "addressSuffix": string,
        "zipCode": string,
        "city": string,
        "state": string,
        "country": string,
        "countryCode": string,
    },
    "contact": {
        "phone": string,
        "mobilePhone": string,
        "email": string,
        "homepage": string,
    },
},
  "dm": {
    "userid": string,
    "created": string | Date,
    "edited": string,
  }
}

Hotel

{
  "hotelid": string,
  "name": string,
  "notes": string,
  "address": {
    "street": string,
    "streetNumber": string
    "addressSuffix": string,
    "zipCode": number,
    "city": string,
    "state": string,
    "country:" string,
    "countryCode": string,
  },
  "contact": {
    "phone": string,
    "mobilePhone": string,
    "email": string,
    "homepage": string,
  },
  "dm": {
    "userid": string,
    "created": string | Date,
    "edited": string,
  }
}

Database ideas

Dynamic Refs could be used for e.g. different types of persons.

Example: A person could be a band member, so he would reference a band. Another person could be an employee in a company, so he would reference a company.

Current approach is: A band / company saves its employees/members. To have a deeper understanding of what / who a person (e.g. on a person list) is, does a bidirectional link make sense? E.g. to have a company name with a link to the company? Or simply just save the company/band name to a persons notes?

Testing

Test run of deal memo data grid

  • Test basic features with cypress
  • Test e.g. datagrid with storybook (=> db data is required => use mock data for basic data grid testing)
  • Test functionality of e.g. deal-memo api with hoppscotch
  • (Advanced: test different browsers with playwright)

Cypress and Storybook tests could be automatically executed in Docker build.

Security

  • Data encryption with MongoDB. Check, if this is needed

Upcoming Features

  • Multi user with company signin: many users can edit stuff simultaneously
  • Desktop standalone application using Tauri
  • Mobile apps (Android/iOS) using Capacitor?

References

Technology used

Part Technology
Core NextJS, React
UI Mantine, React-Table
Database mongodb, mongoose
Security bcrypt, jsonwebtoken, next-auth
API axios
Other dayjs, nodemailer, pdf-lib, uuid, zod

About

A web app for booking in the music industry

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages