https://github.com/artainmo/camagru
42 school project. Primitive instagram-like web-app.
https://github.com/artainmo/camagru
42school css docker docker-compose email html javascript php postgresql web
Last synced: 3 months ago
JSON representation
42 school project. Primitive instagram-like web-app.
- Host: GitHub
- URL: https://github.com/artainmo/camagru
- Owner: artainmo
- Created: 2022-06-07T04:01:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-26T14:47:43.000Z (over 1 year ago)
- Last Synced: 2025-07-11T13:32:39.759Z (12 months ago)
- Topics: 42school, css, docker, docker-compose, email, html, javascript, php, postgresql, web
- Language: PHP
- Homepage:
- Size: 1.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# camagru
42 school [subject](https://cdn.intra.42.fr/pdf/pdf/72690/en.subject.pdf).
In this project we have to write a primitive instagram.
### Stack
Server-side - PHP, PostgreSQL
Client-side - HTML, CSS
structure - MVC (unclean see why in Controller/css/style.css)
### Launch
Write the .env file in same directory as docker-compose.yml file with this content:
POSTGRES_HOST=postgres
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
EMAIL_PASSWORD= #My nickname all lowercase + 123$
CRYPTING_PRIVATE_KEY=AA74CDCC2BBRT935136HH7B63C27
CRYPTING_SECRET_KEY=5fgf5HJ5g27
Usually the content of the .env file should not be given as it breaks the purpose of it. But in this case whereby camagru is an exercise I do not mind giving the codes besides the email password as it already got used by spammers when leaving it public.
From root write following command:
docker-compose up
If wanting to update container with new code before launching:
docker-compose build && docker-compose up
Once launched go in browser to localhost:8000.
### Notes for evaluations
Visualize the database and encrypted passwords from docker-compose:
Access container terminal from docker app -> type 'psql -U postgres' to access the database with psql -> Do the following SQL command to visualize the account rows 'SELECT * FROM account;'
Pictures without overlay-image pdf contradiction:
correctif -> "You must be able to set none or multiple overlayImages"
subject -> "the button allowing to take the picture should be inactive (not clickable) as long as no superposable image has been selected"
Explain composer use: See Controller/utils/sendmail.php
### Bugs
If error occurs when sending emails, it probably means the email address camagru19@hotmail.com got locked, to resolve the problem go unlock it by connecting on outlook to that email account. After you unlocked the account, you may need to wait 5min before you can actually send emails again.