Skip to content

Keep in touch with your friends by sharing photos of special moments, thanks to WASAPhoto! Directly from your PC, you can upload your photos, and they will be visible to everyone who is following you.

License

Notifications You must be signed in to change notification settings

EdoardoAllegrini/WASAPhoto

Repository files navigation


Logo

WASAPhoto

The social media I developed

· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

Keep in touch with your friends by sharing photos of special moments, thanks to WASAPhoto! You can upload your photos directly from your PC, and they will be visible to everyone following you.

(back to top)

Functional design specifications

Each user will be presented with a stream of photos (images) in reverse chronological order, with information about when each photo was uploaded (date and time) and how many likes and comments it has. The stream is composed by photos from “following” (other users that the user follows). Users can place (and later remove) a “like” to photos from other users. Also, users can add comments to any image (even those uploaded by themself). Only authors can remove their comments. Users can ban other users. If user Alice bans user Eve, Eve won’t be able to see any information about Alice. Alice can decide to remove the ban at any moment. Users will have their profiles. The personal profile page for the user shows: the user’s photos (in reverse chronological order), how many photos have been uploaded, and the user’s followers and following. Users can change their usernames, upload photos, remove photos, and follow/unfollow other users. Removal of an image will also remove likes and comments. A user can search other user profiles via username. A user can log in just by specifying the username. See the “Simplified login” section for details.

(back to top)

Built With

(back to top)

Some snaps

Screenshot-2023-06-27-at-18-55-38.png

Screenshot-2023-06-27-at-18-56-26

Project structure

  • cmd/ contains all executables; Go programs here should only do "executable-stuff", like reading options from the CLI/env, etc.
    • cmd/healthcheck is an example of a daemon for checking the health of servers daemons; useful when the hypervisor is not providing HTTP readiness/liveness probes (e.g., Docker engine)
    • cmd/webapi contains an example of a web API server daemon
  • demo/ contains a demo config file
  • doc/ contains the documentation (usually, for APIs, this means an OpenAPI file)
  • service/ has all packages for implementing project-specific functionalities
    • service/api contains an example of an API server
    • service/globaltime contains a wrapper package for time.Time (useful in unit testing)
  • vendor/ is managed by Go, and contains a copy of all dependencies
  • webui/ is an example of a web frontend in Vue.js; it includes:
    • Bootstrap JavaScript framework
    • a customized version of "Bootstrap dashboard" template
    • feather icons as SVG
    • Go code for release embedding

Other project files include:

  • open-npm.sh starts a new (temporary) container using node:lts image for safe web frontend development (you don't want to use npm in your system, do you?)

(back to top)

Getting Started

Prerequisites

  • go
  • node.js
  • vue.js

Usage

How to build

If you're not using the WebUI, or if you don't want to embed the WebUI into the final executable, then:

go build ./cmd/webapi/

If you're using the WebUI and you want to embed it into the final executable:

./open-npm.sh
# (inside the NPM container)
npm run build-embed
exit
# (outside the NPM container)
go build -tags webui ./cmd/webapi/

How to run

Execute backend

cd cmd/webapi
go run .

Execute frontend

./open-npm.sh
# (here you're inside the NPM container)
npm run dev

Container

Build and run backend image

docker build -t wasa-photos-backend:latest -f Dockerfile.backend .
docker run -it --rm -p 3000:3000 wasa-photos-backend:latest

Build and run frontend image

docker build -t wasa-photos-frontend:latest -f Dockerfile.frontend .
docker run -it --rm -p 8081:80 wasa-photos-frontend:latest

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Edoardo Allegrini - website

Project Link: https://github.com/EdoardoAllegrini/WASAPhoto

(back to top)

About

Keep in touch with your friends by sharing photos of special moments, thanks to WASAPhoto! Directly from your PC, you can upload your photos, and they will be visible to everyone who is following you.

Resources

License

Stars

Watchers

Forks

Packages

No packages published