Table of Contents
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.
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.
![Screenshot-2023-06-27-at-18-56-26](https://private-user-images.githubusercontent.com/83579717/381092456-018977bc-4ee3-42e5-bf12-51fe81ed4550.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3MzgxODgsIm5iZiI6MTczODczNzg4OCwicGF0aCI6Ii84MzU3OTcxNy8zODEwOTI0NTYtMDE4OTc3YmMtNGVlMy00MmU1LWJmMTItNTFmZTgxZWQ0NTUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDA2NDQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiMWE1YmU1MTJjYjcyMDM3N2VhOTVlNTZiYTNiYzRkZGRlYzY3NzEwZjIwZDU4NDdjZjBmZTlmMjE5YjgyODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.bNz5H3VmDeHUGJNDVI1Rt_qCMqK4ZvKmRTLJiW5XJlE)
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 filedoc/
contains the documentation (usually, for APIs, this means an OpenAPI file)service/
has all packages for implementing project-specific functionalitiesservice/api
contains an example of an API serverservice/globaltime
contains a wrapper package fortime.Time
(useful in unit testing)
vendor/
is managed by Go, and contains a copy of all dependencieswebui/
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 usingnode:lts
image for safe web frontend development (you don't want to usenpm
in your system, do you?)
- go
- node.js
- vue.js
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/
Execute backend
cd cmd/webapi
go run .
Execute frontend
./open-npm.sh
# (here you're inside the NPM container)
npm run dev
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
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Edoardo Allegrini - website
Project Link: https://github.com/EdoardoAllegrini/WASAPhoto