Mareliusmoen / varberg-games

Mini SoMe for connecting Magic and board game players in Varberg
0 stars 1 forks source link

Varberg MtG and boardgaming Network

About

You can head to the live website here -----> VGB Games
The VBG Games site is a Magic the Gathering and boardgaming network, connecting players in the area in and around Varberg city on the west coast of Sweden. The main goal is to give different playgroups a common site to plan events, sell or buy games, cards and accessories, communicate with eacother. Since the gameshop in Varberg closed down there is no place for people who loves games to connect and meet with likeminded people who are engaged in the same hobby. Indexpage screenshot

Table of Contents

User Experience Design


Strategy

It was developed to help connect poeple in Varberg with likeminded players. The main coal was to allow users to join/create events, sell or buy products, and communicate about everything MtG and boardgames with the messaging service.

Target Audience

This Django project is made for those that:

Responsiveness

Responsiveness screenshot

User Stories

First Time Visitor Goals

Frequent Visitor Goals


Technologies used


Features

The whole page is responsive for different screensizes AND browser based zoom, wich makes the site very smooth to operate no matter how big or small you like the text and content.

Landing page/Homepage
A straightforward landing page with a short welcome-message, links to register or sign in right next to the welcome-message. There is also a nav-bar that only contains the options login or register before you sign in. Indexpage screenshot

Login
The login asks the user to input their username and password, there is also a button if you forgot your passwrod to allow the user to reset it with their email address. Error/success messages pop-in to give the user feedback if the login was successful or if there was an error. Signin page screenshot

Register new user
Allows new visitors to register as users of the site, they need to type in: Username(required), Email(required), Password and confirm password(required), First Name and Last Name. Signup page screenshot

Logged-in welcome
Message that says 'Welcome, you're successfully signed in'. and a automatic Django message that confirms your login. Now that you're signed in as a authenticated user the nav-bar chenges and gives you access to all parts of the site: Events, Messaging, Marketplace and Logout. Signed in page screenshot

Log-out
When the logged in user clicks the logout button in the nav bar the get redirected to a confirmation page that asks if the user is sure they want to sign out and the signout button to confirm. The nav-bar is there for the user regret their logout descion and head to another part of the site. Sign out page screenshot

Browse events
This page lists all the available public events. at the top there is also a button for creating new events and a input field to type in a access-code if another user have giiven you access to one of their private events. If you type a correct code you're automatically added as a participant and you get a django message confirming, if it is not a correct access code you get a django error message explaining that. Each event lists the event title, description, host, time and date, how many participants and 3 buttons: Communicate(opens a message-board for the specific event), join button(if you already have joined its a gray joined "button"), and if you are the creator of the event you have a delete button so you can delete the event. All events are sorted so the events that are happing soonest is displayed at the top if the list and sorted in descending order. There is also a code running in heroku everyday at midnight that deletes all events that happened during the day. upcoming events screenshot

Events communication
When the communicate button for an event is clicked you're brought to a chat-like messaging page for the specific event, all users that have access to the event(for public-events all signed in users, for private events everyone with the access-code) can read and write messages in the communicate page. This feature makes it great for potential perticipants and particapants alike to ask questions to the creator or eachother, so that Q&A's that perhaps more than one user is wondering is answered and available in a logical place. The creator of each message has the opportunity to delete their own messages. The communicate page also displays the event-information at the top of the page so that it's easily accessible. Event conversation screenshot

Create event
The create-event page consists of a Title input-field, Description textarea input, datetime-picker and a checkbox to make a private event. If you check the private event box, you as the creator of a private event will see the access-code for the specific event in the event when you head to your joined events section and this is the code you share with users you would like to join your event. Create event screenshot

Joined events
This page lists all the events you have oined/created. Each event lists the event title, description, host, time and date, how many participants and 3 buttons: Communicate(opens a message-board for the specific event), a gray joined "button", and if you are the creator of the event you have a delete button so you can delete the event. All events are sorted so the events that are happing soonest is displayed at the top if the list and sorted in descending order. There is also a code running in heroku everyday at midnight that deletes all events that happened during the day. Joined events screenshot

Edit events
This part of the event app implements a robust and intuitive event editing functionality specifically designed for the event creators. This allows you to have full control over the event details and make adjustments as necessary. Edit event screenshot

Messages Inbox
The inbox feature in the project provides a centralized location for users to manage and view their received messages. It allows registered users to communicate with each other within the site, facilitating efficient and convenient communication. Inbox screenshot

Sent messages box
The sent message box feature in the project allows users to keep track of the messages they have sent to other users within the site. It provides a convenient way to view and manage sent messages, ensuring that users have a complete record of their communication history. Sentbox screenshot

Deleted messages box
The deleted messages box feature in the project provides a dedicated space for users to store and manage their deleted messages. It offers a convenient way to recover accidentally deleted messages or permanently remove unwanted messages from the system. delete box screenshot

Archived messages box
The archived messages box feature in the project offers users a dedicated space to store and manage their archived messages. It provides a convenient way to declutter the main inbox while still retaining access to important or historical conversations. Archived box screenshot

Write new message
The write new message feature in the project allows users to compose and send new messages to other users within the site. It provides a convenient and intuitive interface for initiating and engaging in conversations. Write new message screenshot

Message conversation
The message conversation feature in the project allows users to view and manage their conversations with other users in a streamlined and intuitive interface. This feature is designed to facilitate seamless and efficient communication within the site. Conversation screenshot

Marketplace all products for sale
The marketplace feature in the project serves as a platform where users can view all available products for sale and display their own products. It provides a seamless and user-friendly interface for exploring, comparing, selling and purchasing products. All product for sale screenshot

Create a new product for sale
The create new product for sale feature in the project allows users to list their own products for sale in the Marketplace. It offers an intuitive interface for users to enter product details and create new listings. Create new product for sale screenshot

Your products for sale overview
The user's products for sale overview feature in the project provides users with a comprehensive dashboard to manage all their product listings in the marketplace. Your products for sale overview screenshot


Future Improvements and Features


Social media verification (facebook, Google...)
In future releases I would like to add that you can sign up to the site with google, facebook or similar account.

Activate and setup email confirmation
Add email confirmation when user signs up for the site, to make sure the user is a real person.

Add email notifications
Add email notifications for new messeges, users joining your events, users show interest in your product for sale.

Add contact seller functionality
Add a 'Contact Seller' button on product listings. This will redirect users to a pre-filled new message form, making communication between buyers and sellers quicker and easier.

Add on-site notification system
Add a notification system for new messeges, users joining your events, users show interest in your product for sale.

Design and make a logo in Adobe Illustrator
Make a logo in Adobe Illustrator that reflects the brand identity of the site.

Make the homepage for logged in users
Make the homepage for logged in users more appealing and attractive, and add functionality like lists of joined events, your products for sale, new messages, etc.

Sort products in the markedplace by Category
Add a filter option in the marketplace to sort products by category.

Sort products in the markedplace by sold/available
Add a filter option in the marketplace to sort products by sold/available.

Add a display next to the navbar that shows which user is logged in
Add a display next to the navbar that makes it easy for the user to make sure he/she is logged in correctly.


Design

The site's design features a calming blue color scheme, accented with playful hues of orange and red. The background illustraion are ment to represent the occean which is a an important part of the coastal city of Varberg, enhancing the visual appeal and providing the "feeling" of the coast. The layout and responsiveness of the site are based on Bootstrap framework

Color Scheme

The colorscheme was taken from the color-design book Papier Tigre Color Inspiration volume 2, it was chosen for its calm blue colors with the playful orange and red complimenting-colors. The RGB codes are:
Colorscheme

Typography

From Google Fonts the 'Wellfleet' was chosen for it's playful look and easy readability, and the back up if not supported is standard 'monospace'.

Imagery

Background image is created by me (Marelius Moen) in Adobe Illustrator, the design of the background is inspired by the occean which is a very important part of the coastal-city Varbergs image. These visuals add visual interest and enhance the user experience, making the site more engaging and visually appealing.

Wireframes

Before starting the development of the VBG Games site, wireframes were created to plan and visualize the layout and structure of the different pages. These wireframes served as a blueprint for the design process, ensuring a cohesive and user-friendly interface.

![Wireframe design](static/images/wireframes/20231121_101654.jpg) ![Wireframe design](static/images/wireframes/20231121_101707.jpg) ![Wireframe design](static/images/wireframes/20231121_101721.jpg) ![Wireframe design](static/images/wireframes/20231121_101743.jpg) ![Wireframe design](static/images/wireframes/20231121_101753.jpg) ![Wireframe design](static/images/wireframes/20231121_101812.jpg) ![Wireframe design](static/images/wireframes/20231121_101824.jpg)

Information Architecture

Database

Our application uses the PostgreSQL database to handle data persistence.

Data Modeling

Allauth We use the Django Allauth package to manage user authentication. It was migrated to PostgreSQL database.

POSTMAN MESSAGING

Message

A message between a User and another User or an AnonymousUser.

Fields
Name Database Key Field Type Validation
Sender sender ForeignKey to User on_delete=models.CASCADE
Recipient recipient ForeignKey to User on_delete=models.CASCADE, related_name='recipient_messages'
Subject subject CharField max_length=255
Body body TextField None
Email email EmailField blank=True
Parent parent ForeignKey to 'self' on_delete=models.CASCADE, related_name='next_messages', null=True, blank=True
Thread thread ForeignKey to 'self' on_delete=models.CASCADE, related_name='child_messages', null=True, blank=True
Sent at sent_at DateTimeField default=now
Read at read_at DateTimeField null=True, blank=True
Replied at replied_at DateTimeField null=True, blank=True
Sender Archived sender_archived BooleanField default=False
Recipient Archived recipient_archived BooleanField default=False
Sender Deleted At sender_deleted_at DateTimeField null=True, blank=True
Recipient Deleted At recipient_deleted_at DateTimeField null=True, blank=True
Moderation Status moderation_status CharField max_length=1, choices=STATUS_CHOICES, default=STATUS_ACCEPTED
Moderation By moderation_by ForeignKey to User on_delete=models.CASCADE, related_name='moderated_messages', null=True, blank=True
Moderation Date moderation_date DateTimeField null=True, blank=True
Moderation Reason moderation_reason CharField max_length=120, blank=True
Methods

PendingMessage (Proxy Model)

A proxy to Message, focused on pending objects to accept or reject.

Fields

Same as Message

Methods

MARKETPLACE

Category

Represents a product category.

Fields
Name Database Key Field Type Validation
Name name CharField max_length=100
Methods

Product

Represents a product in the e-commerce system.

Fields
Name Database Key Field Type Validation
Title title CharField max_length=200
Description description TextField None
Price price DecimalField max_digits=10, decimal_places=2
Category category ForeignKey to Category on_delete=models.CASCADE
Seller seller ForeignKey to User on_delete=models.CASCADE
Created At created_at DateTimeField auto_now_add=True
Card Name card_name CharField max_length=255, null=True, blank=True
Card Image URL card_image_url URLField null=True, blank=True
Sold sold BooleanField default=False

EVENTS

Event

Represents an event with details such as title, description, date, and participants.

Fields
Name Database Key Field Type Validation
Title title CharField max_length=100
Description description TextField None
Date date DateTimeField None
Is Private is_private BooleanField default=False
Creator creator ForeignKey to User on_delete=models.CASCADE
Participants participants ManyToManyField to User related_name='events_attending'
Access Code access_code CharField max_length=10, null=True, blank=True
Comments comments ManyToManyField to Comment blank=True, related_name='event_comments'
Methods

EventParticipant

Links users to events they are participating in.

Fields
Name Database Key Field Type Validation
Event event ForeignKey to Event on_delete=models.CASCADE
User user ForeignKey to User on_delete=models.CASCADE

Comment

Represents a comment on an event.

Fields
Name Database Key Field Type Validation
Event event ForeignKey to Event on_delete=models.CASCADE
User user ForeignKey to User on_delete=models.CASCADE
Text text TextField None
Created At created_at DateTimeField auto_now_add=True
Methods

Utility Function

generate_access_code()

Generates a random access code consisting of 10 digits connected to the specific event.

python
def generate_access_code():
    return ''.join(secrets.choice(string.digits) for _ in range(10)) 

Testing

Manual testing

Manual tests where done to make sure all user experience features work as intended.

Test Case Description Expected Outcome Successful
See Public Events User is able to view all the public events. A list of public events is displayed.
Join Public Events User can join a public event. User is added to the event's participants.
Create Public Events User can create a new public event. A new public event is created and visible to all users.
Create Private Events User can create a new private event. A new private event is created and visible only to invited users.
Join Private Events with Access Code User can join a private event with a valid access code. User is added to the event's participants upon entering a valid access code.
See Messages Received User can view all received messages. A list of received messages is displayed.
See Messages Sent User can view all sent messages. A list of sent messages is displayed.
See Messages Archived User can view all archived messages. A list of archived messages is displayed.
See Messages Deleted User can view all deleted messages. A list of deleted messages is displayed.
Send New Messages User can send new messages to other users. The message is successfully sent and appears in the recipient's received messages.
Reply to Message in Conversation User can reply to a message within a conversation thread. The reply is successfully sent and appears in the conversation thread.
See Products for Sale User can view all products for sale. A list of products for sale is displayed.
See Which Products Are Sold User can view all sold products. A list of sold products is displayed.
See the Products You Have Put Up for Sale User can view all the products they have put up for sale. A list of the user's products for sale is displayed.
Create New Product Listing for Sale User can create a new product listing for sale. A new product listing is created and visible to all users.
Register as New User User can register a new account. A new account is successfully created for the user.
Sign In with Registered User User can sign in with their registered account. User is successfully signed in to their account.
Sign Out with Registered User User can sign out from their registered account. User is successfully signed out from their account.

PEP8

To ensure the quality and readability of the Python code in this project, all Python files were checked with the PEP8 linter provided by Code Institute. This tool helps enforce the PEP8 style guide, which is widely accepted in the Python community for coding standards.

The PEP8 linter checks for issues like line lengths, whitespace usage, variable naming conventions, docstrings and more. The code in this project has passed the PEP8 linter test without any errors, which means that it adheres to these standards, making it easier to read and maintain.

You can check the PEP8 linter here: PEP8 linter

Validators

CSS Validator

The CSS code in this project was tested using the W3C CSS Validator and passed without any errors.

HTML Validator

The HTML code in this project was tested using the W3C HTML Validator and passed without any errors.

Dev Tools Lighthouse

The site has been tested using Lighthouse and has achieved the following scores:

These scores indicate the site's high performance, accessibility, adherence to best practices, and search engine optimization. Lighthouse test results screenshot

Deployed vs Local

The final version of the Full-Stack application was deployed to Heroku, while the database was deployed to ElephantSQL. This deployed version was thoroughly tested to ensure its functionality matches the version in the development environment.

Both the deployed and local versions were tested across various scenarios and functionalities as documented in this 'Testing' section. The tests confirmed that the deployed version of the application behaves as expected and mirrors the development version.

It's important to note that consistent code quality was maintained throughout the project. This was ensured by adhering to the PEP8 style guide, facilitated by the PEP8 linter provided by Code Institute.

For further details on the deployment process, refer to the 'Deployment' section below.

Deployment

You find the deployed app here: LINK The app is deployed to Heroku and the database to ElephantSQL.

Heroku

The project was deployed to Heroku using the below procedure:-

Create Database on ElephantSQL

  1. Go to ElephantSQL and create a new account.

  2. Create a new instance of the database.

  3. Select a name for your database and select the free plan.

  4. Click "Select Region"

  5. Select a region close to you.

  6. Click "Review"

  7. Click "Create Instance"

  8. Click on the name of your database to open the dashboard.

  9. You will see the dashboard of your database. You will need the URL of your database to connect it to your Django project.

Local Deployment

  1. Clone the repository.

    • git clone https://github.com/Mareliusmoen/varberg-games.git
  2. Go to the varberg-games directory.

    • cd varberg-games (or your path to the project)
  3. Create a virtual environment.

    • python3 -m venv venv

    • source venv/bin/activate

  4. Install all dependencies.

    • pip install -r requirements.txt
  5. Create a env.py file.

    • touch env.py
  6. Add the following lines to env.py:

    • import os
    • os.environ["SECRET_KEY"] = your secret key.
    • os.environ["DEBUG"] = "True" or "False" depending on whether you are in development or production.
    • os.environ["DEVELOPMENT"] = "True" or "False" depending on whether you are in development or production.
    • os.environ["ALLOWED_HOSTS"] = your domain name.
    • os.environ["DATABASE_URL"] = your database url.
  7. Create and migrate the database.

    • python manage.py makemigrations
    • python manage.py migrate
  8. Create the superuser.

    • python manage.py createsuperuser
  9. Run the server.

    • python manage.py runserver
  10. Access the website by the link provided in terminal. Add /admin/ at the end of the link to access the admin panel.

Bugs

Unfixed bugs

Credits


Acknowledgments