Skip to content

Commit 68f7c65

Browse files
End README
1 parent e217d06 commit 68f7c65

File tree

2 files changed

+160
-31
lines changed

2 files changed

+160
-31
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ docker-compose.log
1111
/doc/html
1212
/doc/json
1313
/doc/markdown
14-
webapi
14+
webapi
15+
readme_backup_img/

README.md

Lines changed: 158 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,96 @@
1-
# Fantastic coffee (decaffeinated)
2-
3-
This repository contains the basic structure for [Web and Software Application](http://gamificationlab.uniroma1.it/en/wasa/) homework project.
4-
It has been described in class.
5-
6-
"Fantastic coffee (decaffeinated)" is a simplified version for the WASA course, not suitable for a production environment.
7-
The full version can be found in the "Fantastic Coffee" repository.
8-
9-
## Project structure
1+
<a id="readme-top"></a>
2+
3+
<!-- PROJECT LOGO -->
4+
<br />
5+
<div align="center">
6+
<a href="https://github.com/EdoardoAllegrini/WASAPhoto">
7+
<img src="https://i.postimg.cc/cHJKh58L/images-1.jpg" alt="Logo" width="80">
8+
</a>
9+
10+
<h3 align="center">WASAPhoto</h3>
11+
12+
<p align="center">
13+
The social media I developed
14+
<br />
15+
<br />
16+
·
17+
<a href="https://github.com/EdoardoAllegrini/WASAPhoto/issues">Report Bug</a>
18+
·
19+
<a href="https://github.com/EdoardoAllegrini/WASAPhoto/issues">Request Feature</a>
20+
</p>
21+
</div>
22+
23+
<!-- TABLE OF CONTENTS -->
24+
<details open>
25+
<summary>Table of Contents</summary>
26+
<ol>
27+
<li>
28+
<a href="#about-the-project">About The Project</a>
29+
<ul>
30+
<li><a href="#functional-design-specifications">Functional design specifications</a></li>
31+
<li><a href="#built-with">Built With</a></li>
32+
<li><a href="#some-snaps">Some snaps</a></li>
33+
<li><a href="#project-structure">Project structure</a></li>
34+
</ul>
35+
</li>
36+
<li>
37+
<a href="#getting-started">Getting Started</a>
38+
<ul>
39+
<li><a href="#prerequisites">Prerequisites</a></li>
40+
</ul>
41+
</li>
42+
<li><a href="#usage">Usage</a></li>
43+
<ul>
44+
<li><a href="#how-to-build">How to build</a></li>
45+
<li><a href="#how-to-run">How to run</a></li>
46+
<li><a href="#container">Container</a></li>
47+
</ul>
48+
<li><a href="#contributing">Contributing</a></li>
49+
<li><a href="#license">License</a></li>
50+
<li><a href="#contact">Contact</a></li>
51+
</ol>
52+
</details>
53+
54+
<!-- ABOUT THE PROJECT -->
55+
## About The Project
56+
57+
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.
58+
59+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
60+
61+
### Functional design specifications
62+
63+
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.
64+
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.
65+
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.
66+
A user can search other user profiles via username.
67+
A user can log in just by specifying the username. See the “Simplified login” section for details.
68+
69+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
70+
71+
### Built With
72+
73+
<div align="center">
74+
<img src="https://img.shields.io/badge/Go-00ADD8?style=for-the-badge&logo=go&logoColor=white">
75+
<img src="https://img.shields.io/badge/SQLite-07405E?style=for-the-badge&logo=sqlite&logoColor=white">
76+
<img src="https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge&logo=html5&logoColor=white">
77+
<img src="https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge&logo=css3&logoColor=white">
78+
<img src="https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&logo=javascript&logoColor=F7DF1E">
79+
<img src="https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vue.js&logoColor=4FC08D">
80+
<img src="https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white">
81+
<img src="https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white">
82+
<img src="https://img.shields.io/badge/GIT-E44C30?style=for-the-badge&logo=git&logoColor=white">
83+
</div>
84+
85+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
86+
87+
88+
### Some snaps
89+
[![Screenshot-2023-06-27-at-18-55-38.png](https://i.postimg.cc/9MnQXmgG/Screenshot-2023-06-27-at-18-55-38.png)](https://postimg.cc/342TnTTR)
90+
91+
[![Screenshot-2023-06-27-at-18-56-26.png](https://i.postimg.cc/zXyC83vG/Screenshot-2023-06-27-at-18-56-26.png)](https://postimg.cc/LnMYV9jc)
92+
93+
### Project structure
1094

1195
* `cmd/` contains all executables; Go programs here should only do "executable-stuff", like reading options from the CLI/env, etc.
1296
* `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)
@@ -26,32 +110,21 @@ The full version can be found in the "Fantastic Coffee" repository.
26110
Other project files include:
27111
* `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?)
28112

29-
## Go vendoring
30-
31-
This project uses [Go Vendoring](https://go.dev/ref/mod#vendoring). You must use `go mod vendor` after changing some dependency (`go get` or `go mod tidy`) and add all files under `vendor/` directory in your commit.
113+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
32114

33-
For more information about vendoring:
115+
<!-- GETTING STARTED -->
116+
## Getting Started
34117

35-
* https://go.dev/ref/mod#vendoring
36-
* https://www.ardanlabs.com/blog/2020/04/modules-06-vendoring.html
118+
### Prerequisites
37119

38-
## Node/NPM vendoring
120+
* go
121+
* node.js
122+
* vue.js
39123

40-
This repository contains the `webui/node_modules` directory with all dependencies for Vue.JS. You should commit the content of that directory and both `package.json` and `package-lock.json`.
41124

42-
## How to set up a new project from this template
125+
## Usage
43126

44-
You need to:
45-
46-
* Change the Go module path to your module path in `go.mod`, `go.sum`, and in `*.go` files around the project
47-
* Rewrite the API documentation `doc/api.yaml`
48-
* If no web frontend is expected, remove `webui` and `cmd/webapi/register-webui.go`
49-
* If no cronjobs or health checks are needed, remove them from `cmd/`
50-
* Update top/package comment inside `cmd/webapi/main.go` to reflect the actual project usage, goal, and general info
51-
* Update the code in `run()` function (`cmd/webapi/main.go`) to connect to databases or external resources
52-
* Write API code inside `service/api`, and create any further package inside `service/` (or subdirectories)
53-
54-
## How to build
127+
### How to build
55128

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

@@ -70,6 +143,61 @@ exit
70143
go build -tags webui ./cmd/webapi/
71144
```
72145

146+
147+
### How to run
148+
Execute backend
149+
```shell
150+
cd cmd/webapi
151+
go run .
152+
```
153+
154+
Execute frontend
155+
```
156+
./open-npm.sh
157+
# (here you're inside the NPM container)
158+
npm run dev
159+
```
160+
161+
### Container
162+
Build and run backend image
163+
```
164+
docker build -t wasa-photos-backend:latest -f Dockerfile.backend .
165+
docker run -it --rm -p 3000:3000 wasa-photos-backend:latest
166+
```
167+
Build and run frontend image
168+
```
169+
docker build -t wasa-photos-frontend:latest -f Dockerfile.frontend .
170+
docker run -it --rm -p 8081:80 wasa-photos-frontend:latest
171+
```
172+
173+
<!-- CONTRIBUTING -->
174+
## Contributing
175+
176+
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
177+
178+
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".
179+
Don't forget to give the project a star! Thanks again!
180+
181+
1. Fork the Project
182+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
183+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
184+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
185+
5. Open a Pull Request
186+
187+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
188+
189+
<!-- LICENSE -->
73190
## License
74191

75-
See [LICENSE](LICENSE).
192+
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
193+
194+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
195+
196+
<!-- CONTACT -->
197+
## Contact
198+
199+
Edoardo Allegrini - [website](https://EdoardoAllegrini.github.io)
200+
201+
Project Link: [https://github.com/EdoardoAllegrini/WASAPhoto](https://github.com/EdoardoAllegrini/WASAPhoto)
202+
203+
<p align="right">(<a href="#readme-top">back to top</a>)</p>

0 commit comments

Comments
 (0)