First project @ 42SiliconValley's web branch.
Camagru is a small web application that allows you to take and edit pictures to share them with the other users (Instagram inspired).
Feed | Photo | Profile editing |
---|---|---|
There are a few required environment variables for Camagru server to run:
DB_URL
: String, connection string for mongodbDEV
: Boolean, controls debug levelJWT_KEY
: String, random hash to secure json-web-tokensMAIL_USER
: String, email address used to send application emails to usersMAIL_PASS
: String, email passwordAPP_URL
: String, base url for the app (on dev should behttp://localhost:8080
)
:8080 is webpack's default port, even tho this setting is only for back-end it is used for front-end resources such as email links
IMGUR_CLIENT_ID
: String, credentials for imgur APIIMGUR_CLIENT_SECRET
: String, credentials for imgur API
git clone [email protected]:raggesilver/camagru
cd camagru
yarn install
# Get .env file
# Modify APP_URL to whatever makes sense
cd front
yarn install
yarn run build
cd ..
node -r dotenv/config server # or yarn run server
API endpoints can be accessed from /api
.
Endpoint | Type | Body | Response | Description |
---|---|---|---|---|
/api/user/me |
GET | JSON | Get logged user info |
Endpoint | Type | Body | Response | Description |
---|---|---|---|---|
/api/auth/register |
POST | JSON Object | OK/<ERROR_MESSAGE> | Register a new user |
Endpoint | Type | Body | Response | Description |
---|---|---|---|---|
/api/post |
GET | JSON Array | OK/<ERROR_MESSAGE> | Get all posts |
Default error for API is:
{ error: 'Human readable error' }
. For API error identifing the status code should be checked
Delete posts- doneLogin with username- doneThumbnails with previous pictures- Profile counts as it is not mandatoryForgot password email link- done
Suggested:
- "AJAXIFIED" - it's axios actually
- Infinite gallery
Mine:
- Time ago countdown
- Hashtag highlight
- Filters
- Auto login on register
- Email links (user, post and comment) back to the website
- Auto scroll focus on email links