Skip to content

gonzalez-aj/staygoldcowboy-server

Repository files navigation

Stay Gold, Cowboy

Client-Side: React Next.JS

Topics


Overview

  • The ideal user for Stay Gold, Cowboy is a fan of Sonatore
  • Fans can sign in with Google authentication and upload their favorite image URLs of Sonatore's art
  • Fans can organize the artwork by tags

ERD

Wireframe

Get Started

  1. Clone Stay Gold, Cowboy to your local machine
[email protected]:AngieMGonzalez/staygoldcowboy-server.git
  1. Move into the directory cd staygoldcowboy-server
  2. *Optional run pip install pyenv
  3. Install Python 3.9.16
  4. Install pipenv pip install pipenv
  5. Start your virtual environment pipenv shell
  6. Run the Server by starting the debugger or running python3 manage.py runserver
  7. Setup and run the Stay Gold, Cowboy Client for this project to run on local machine.

MVP Features

  • Fans of Sonatore sign in with Firebase Google authentication
  • Fans can browse all the art and all the tags
  • Fans can create, read, update and delete art and tags
  • Fans can create read update and delete their own snippet ideas
  • Art has information regarding creation date, tags, and image url
  • Fans can filter art by tags

Video Walkthrough of MVP

Relevant Links

ERD

Stay Gold, Cowboy MVP ERD

  • Assumption: Art can have many tags, and tags can be associated with many pieces of art.

Code Snippet

Create an Art Obj

class ArtView(ViewSet):
    """SGC Art view viewsets"""

    def create(self, request):
        """Handle POST operations

        Returns
            Response -- JSON serialized art instance
        """
        data = request.data
        fan = Fan.objects.get(uid=request.META['HTTP_AUTHORIZATION'])
        tag_ids = data["tagId"]

        new_art = Art.objects.create(
            fan=fan,
            title=data["title"],
            creation_date=data["creationDate"],
            image_url=data["imageUrl"],
        )

        for tag_id in tag_ids:
            tag = Tag.objects.get(pk=tag_id)
            new_art.tag.add(tag)

        serializer = ArtSerializer(new_art)
        return Response(serializer.data, status=status.HTTP_201_CREATED)

MVP Project Screenshots

Stay Gold, Cowboy MVP Home Page

Tech and Frameworks Used

Python Django
SQLite
Firebase

Future Features

  • fans will be able to search through any description word or tag of on the art piece
  • fans will be able to filter art by camera types used as well
  • fans will be able to upload image files (JPG, IMG, PNG)

Contributors

About

Server side for Full-Stack Capstone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published