davefeucht / photo-portfolio-backend

Backend CMS pieces for photo-portfolio
1 stars 0 forks source link

Backend Specs #1

Open davefeucht opened 1 year ago

davefeucht commented 1 year ago

The backend for the application needs to have an API which will be defined in a set of issues (one for each endpoint), needs to be able to serve media files, and must contain data about SiteInfo, Posts, Pages, Categories and Media as will be described below:

Media:

{
        alt_text: string,
        author: number,
        caption: string,
        comment_status: string,
        date: string,
        date_gmt: string,
        description: string,
        guid: string,
        id: number,
        link: string,
        media_details: {
            width: number,
            height: number,
            file: string,
            sizes: {
                full?: MediaSize,
                large?: MediaSize,
                medium?: MediaSize,
                medium_large?: MediaSize,
                thumbnail?: MediaSize
            },
            media_type: 'image' | 'video' | 'text' | 'application' | 'audio'
        }
    }

Category:

{
    id: number,
    count: number,
    description: string,
    link: string,
    name: string,
    slug: string,
    taxonomy: string,
    parent: number
}

Post:

{
    id: number,
    link: string,
    modified: string,
    type: string,
    title: string,
    content: string,
    author: number,
    featured_media: number,
    categories: number[],
    tags: number[],
    thumbnail_image: string
}

Page:

{
    id: number,
    link: string,
    modified: string,
    type: string,
    title: string,
    content: string,
    author: number,
    featured_media: number
}

Site Info:

{
        description: string,
        gmt_offset: string,
        home: string,
        name: string,
        site_icon: number,
        site_icon_url: string,
        site_logo: number,
        timezone_string: string,
        url: string
}

Media files will be hosted on a filesystem and served by a web server. Metadata as described above will be stored in a mySQL database.

davefeucht commented 1 year ago

@eoikonomou