Code Monkey home page Code Monkey logo

johnshields / repota-app Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 28.17 MB

Repota is designed to be a service report application for automobile technicians for auto dealerships and rental companies.

Home Page: https://www.repota-service.com

Go 15.16% JavaScript 4.46% TypeScript 24.09% HTML 11.23% SCSS 6.95% TeX 36.61% Dockerfile 0.15% Gherkin 1.35%
final-year-project dissertation golang-backend golang typescript ionic-framework angular mysql latex front-end

repota-app's Introduction

Applied Project and Minor Dissertation

GMIT Logo

John Shields - G00348436

Project Details

Project Title Repota
Course BSc (Hons) in Software Development
Module Applied Project and Minor Dissertation
Institute Galway-Mayo Institute of Technology
Student John Shields
Project Advisor Andrew Beatty
Module Supervisor Dr. John Healy
Grade Achieved 71%

Repota Logo

Repota

Repota is designed to be a service report application for automobile technicians for auto dealerships and rental companies. With Repota, technicians are free to create, review, edit and delete their reports for services they have performed on automobiles with the option to export them to PDFs.


How to Run Locally -> click here

View the Application's Guide

Check out the OpenAPI's documentation


Repository Contents

The source code of the Front-end.

The source code of the Back-end.

OpenAPI Specification of the Front-end and Back-end APIs.

The script for the Application's Database.

The Project's Dissertation.

All workings for the project.


END OF README

repota-app's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nsatwik

repota-app's Issues

Go & Gin - Current problem with binding

invalid character '-' in numeric literal
Keeps coming back EMPTY!

Golang code

type InlineObject struct {

  Username string json:"username,omitempty"

  Name string json:"name,omitempty"

  Password string json:"password,omitempty"
}

func Register(c *gin.Context) {
  var user InlineObject

  // current problem with binding
  err :=  c.ShouldBindJSON(&user)
  if err != nil {
    log.Println(user.Username)
    fmt.Println(err.Error())
  }
  log.Println(c.Params)
}

Error

GIN] 2021/01/29 - 02:26:17 | 200 |      2.9992ms |             ::1 | GET      "/api/v1/jobReports"
invalid character '-' in numeric literal
[GIN] 2021/01/29 - 02:36:20 | 400 |            0s |             ::1 | POST     "/api/v1/register?username=brando&name=Marlon&password=orange"
2021/01/29 02:36:20 
2021/01/29 02:36:20 []

Should be

[brando, Marlon, orange]

TODO - try out different ways of binding

Linux Server. Golang Backend Server now works with MySQL.

1: Angular/Ionic app set up.
2: Golang BackEnd Server set up.
3: Made a Linux Server with ports 3306 & 8080 for mysql and Golang Server.
4: Made SQL Server with account John to access from anywhere.
5: Golang BackEnd Server is working with MySQL.

Now that this is all in place I just need to get some requests working for the BackEnd Server with Golang and MySQL.

MySQL JOIN queries

I have worked out some MySQL JOIN queries that will be needed to display the data from 4 different tables in the database to the actual app itself. This is mainly to be able to display a Service Report Card of the data which is one of the app's main functions. I have broken the data up into blocks. The data is as follows:


Block 1

  • Report number -- Date
  • Customer name -- Vehicle model
  • Vehicle registration -- Vehicle location
  • Miles on vehicle -- Warranty | Breakdown

Block 2

  • Customer complaint -- Cause
  • Correction -- Parts

Block 3

  • Worker name -- Work hours

This website really helped me complete this.

Tests

Issue for Tracking Tests.

MySQL JOIN queries duplicates

I realized I have to redesign the database in order for these JOIN queries to work. The values in the database are not unique enough and that is why their outputs are duplicating. I need to add more variety to it. e.g. instead or having 'worker_id 1, 2, 3, 4' I need to do' worker_id 14, 23, 45, 66' and so on.

This will lead to do a Test Driven Development.
I have to start small, take one input for each table and verify query is correct for every possible outcome. Then increment slowly.

Test all possible routes with one worker_id ...

MySQL - Typescript - Golang: - Boolean values in Database are having trouble parsing to JSON when requested from the Client.

JSON parsing bools

The Database was refactored as it made more sense for creating and updating but some values were changed to booleans to work as tick boxes in the app.

Currently having JSON issues with parsing booleans from MySQL database.

The Client is requesting the data from the server and the server has no problem sending the data but as of now when it comes to the client - JSON cannot parse it.

image

Cookies are not being set in browsers

Cookies are not being set in Browsers but are in Postman.

Using Golang with Gin.

c *gin.Context

c.SetCookie("session_id", session.Token, session.Expiry, "/", "localhost", false, false)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.