downtomeet

module
v0.0.0-...-77bbea8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: MIT

README

DownToMeet

This repository contains the client and server of the DownToMeet application, created for Computer Science 130 (Software Engineering) at UCLA during Fall 2020.

Team

  • Connie Chen
  • Timothy Gu
  • Linus Lam
  • Jamie Liu
  • Timothy Rediehs

Directory Structure

Client

All of our client-side code is located in the client folder in the root directory of this repository, which contains the src and public sub-directories. Our application's index.html and public assets are located in public, whereas the source code is in src. The README also contains additional information on how to build and run the client.

Looking in the src folder, we used redux to manage the state of our application. The store is located in the app folder, whereas the actions and reducers are located in stores\user. The source code for all our React components is located in the components directory. lib contains implementations for the methods used to fetch data from our server. The app is defined in App.js, and rendered in index.js.

Server

All of our server-side code is located in the server folder in the root directory of this repository. This folders contains the cmd\down-to-meet, db, impl, models, and restapi subdirectories. Additional information as well as instructions on building and running the server can be found in the README in this folder.

In the server directory is also the swagger.yml file. This is where we define our OpenAPI specification, including the available endpoints and input/output types for our API. The information defined in this file is used by go-swagger to auto-generate the code in the models, restapi, and cmd\down-to-meet subdirectories. models defines the data structures used by our server and API, restapi contains server boilerplate, and cmd\down-to-meet auto-generated source code for the server binary.

The db subdirectory is where our database schema is defined. Endpoint implementations and their associated tests are located in the impl folder. For each endpoint located in xxx.go, the corresponding tests can be found in xxx_test.go.

Testing

To build the client, run the following commands:

$ cd client
$ yarn
$ yarn start

For additional information or help, refer to the README.

To build the server, run the following commands:

$ cd server
$ make start

For additional information or help, refer to the README.

To run the tests, run the following commands, from any folder in the repository:

# Backend tests
$ go test go.timothygu.me/downtomeet/server/impl

# Frontend tests
$ yarn test

Documentation

Our documentation is located in the docs folder. The server subdirectory contains the documentation for our server-side handlers and functions. The client subdirectory contains the documentation for our frontend components. The file api-documentation.pdf contains the full documentation for our REST API, as auto-generated by Swagger.

Directories

Path Synopsis
server
db
Package db implements DownToMeet server's connection to the PostgreSQL database.
Package db implements DownToMeet server's connection to the PostgreSQL database.
impl
Package impl contains the business logic of the DownToMeet server.
Package impl contains the business logic of the DownToMeet server.
impl/nonce
Package nonce implements a simple ASCII nonce generator, as well as some randomization utilities.
Package nonce implements a simple ASCII nonce generator, as well as some randomization utilities.
impl/responders
Package responders contains implementations of middleware.Responder that can be useful for any endpoint.
Package responders contains implementations of middleware.Responder that can be useful for any endpoint.
restapi
Package restapi Internal DownToMeet API Schemes: http Host: localhost BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - text/html - application/json swagger:meta
Package restapi Internal DownToMeet API Schemes: http Host: localhost BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - text/html - application/json swagger:meta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL