{"id":17214979,"url":"https://github.com/coteh/simpleimage","last_synced_at":"2025-04-13T23:17:00.727Z","repository":{"id":37500483,"uuid":"110643155","full_name":"Coteh/simpleimage","owner":"Coteh","description":":sunrise_over_mountains: A simple image hosting service implemented using Node.js + Express + MongoDB + Redis","archived":false,"fork":false,"pushed_at":"2024-04-01T12:17:41.000Z","size":15005,"stargazers_count":9,"open_issues_count":11,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T20:22:03.450Z","etag":null,"topics":["ejs","express","hacktoberfest","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Coteh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-11-14T05:06:14.000Z","updated_at":"2024-04-17T01:26:13.490Z","dependencies_parsed_at":"2023-10-14T21:15:04.945Z","dependency_job_id":"829bd397-cc85-4eb1-954b-278828efef8a","html_url":"https://github.com/Coteh/simpleimage","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coteh%2Fsimpleimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coteh%2Fsimpleimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coteh%2Fsimpleimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coteh%2Fsimpleimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coteh","download_url":"https://codeload.github.com/Coteh/simpleimage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794570,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ejs","express","hacktoberfest","mongodb","nodejs"],"created_at":"2024-10-15T03:22:47.435Z","updated_at":"2025-04-13T23:17:00.694Z","avatar_url":"https://github.com/Coteh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![simpleimage logo](assets/images/logo.svg \"simpleimage\")\n\n[![CircleCI](https://circleci.com/gh/Coteh/simpleimage.svg?style=shield)](https://circleci.com/gh/Coteh/simpleimage)\n[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/Coteh/simpleimage)\n\nA simple image hosting web application that I created and implemented using Node.js and Express, with MongoDB as the database and Redis as the session store.\n\n![Screenshot](screenshots/screenshot.png \"App Screenshot\")\n\n## Features\n\n* Upload BMP, PNG, JPEG, and GIF images\n* Comment on images\n* Image page\n    * Image upload date\n    * Total number of comments on image\n* Delete your images (Must have an account)\n* User profile page\n    * Join date\n    * Comment history and total number of comments posted\n* User settings\n    * Change password\n* Rotates JPEG images based on Orientation tag in EXIF metadata\n* Strips EXIF metadata from JPEG images\n\n## Installation\n\n### .env Template\n\n```\nMONGODB_URI=\u003cMongoDB URI goes here\u003e\nREDIS_URL=\u003cRedis URL goes here\u003e\nMONGO_ROOT_USERNAME=\u003croot username for MongoDB instance\u003e\nMONGO_ROOT_PASSWORD=\u003croot password for MongoDB instance\u003e\nMONGO_INITIAL_DATABASE=\u003cinitial database for MongoDB instance\u003e\n\nSESSION_SECRET=\u003csession secret goes here\u003e\nGA_TRACKING_ID=\u003cGoogle Analytics Tracking ID (Universal Analytics)\u003e\nLOGIN_TO_UPLOAD=true  # omit this variable if you don't want to require users to login to upload\nFILE_SIZE_LIMIT=5000000 # omit this variable if you want the default file size limit of 500 MB\n\nEVALUATION_MODE=true # omit this variable to disable automatic removal of images\nEXPIRE_AFTER_SECONDS=300 # set this to set time for the images to be stored in database in evaluation mode (default is 300 if unspecified)\n\nSENTRY_DSN=\u003cSentry DSN\u003e                     # endpoint to upload Sentry events\nSENTRY_AUTH_TOKEN=\u003cSentry Auth Token\u003e       # used for uploading source maps to Sentry\nSENTRY_ORG=\u003cSentry Organization (slug)\u003e     # used for associating the Sentry organization to upload source maps to\n```\n\n### Building and Running Locally\n\n~~~sh\n# Install dependencies\nnpm install\n\n# Build web components with webpack (and watch for changes when in development mode)\nnpm run build:client\n\n# Run local MongoDB database\nmongod --dbpath ./data/\n\n# Export SESSION_SECRET environment variable (or use a .env file)\nexport SESSION_SECRET=\"my-secret\"\n\n# Run the app\nnpm start\n# or, run the app in development mode\nnpm run start:dev\n\n# Navigate to http://localhost:3010 on your browser\n~~~\n\n### Serving with Docker\n\nView [Makefile](Makefile) to see what each `make` command does.\n\n#### Development\n\n~~~sh\n# Build Docker images\nmake build-dev              # make bd\n\n# Run Docker containers in Docker Compose environment\nmake deploy-dev             # make dd\n# or, run the following if you want to use the Node.js debugger as well (port 9229)\nmake deploy-dev-debug       # make ddd\n\n# Navigate to http://localhost:8080 on your browser\n~~~\n\n#### Production\n\n~~~sh\n# Build Docker images\nmake build-prod             # make bp\n\n# Run Docker containers in Docker Compose environment\nmake deploy-prod            # make dp\n~~~\n\n#### Unit/Integration Tests\n\n~~~sh\n# Build Docker images for test\nmake build-test             # make bt\n\n# Run Docker containers for test in Docker Compose environment\nmake deploy-test            # make dt\n# or, run the following if you want to use the Node.js debugger as well (port 9229 - will wait for debugger to be attached before starting)\nmake deploy-test-debug       # make dtd\n\n# to test a specific file, pass it like the example below: (can also be passed into deploy-test-debug)\nmake deploy-test TEST_FILE=./test/integ/image_delete_integ_test.js\n~~~\n\n#### Cypress E2E Tests\n\n```sh\n# Build Docker images for E2E testing (E2E tests use production environment)\nmake build-prod             # make bp\n\n# Run Docker containers for E2E testing in Docker Compose environment\nmake deploy-test-server     # make dts\n\n# Install dev dependencies (includes Cypress)\nnpm install\n\n# Run Cypress for E2E testing\nnpm run test:e2e\n# Run Cypress with UI interface (for local testing)\nnpm run test:cypress\n```\n\n#### Use HTTPS in dev\n\nUsing [mkcert](https://github.com/FiloSottile/mkcert):\n\n```sh\nmkdir ssl\ncd ssl\n\nmkcert -install\n\nmkcert localhost 127.0.0.1 ::1\n```\n\nTo run development environment using dev HTTPS certs:\n\n```sh\nmake deploy-dev-https       # make dds\n```\n\n#### Clean Docker images and volumes\n\n```sh\nmake clean\n```\n\n## Known Limitations\n\n* Cannot change username/email\n* Some of the popup dialogs need a bit of size tweaking (e.g. signup dialog)\n* No image upload history (Currently being worked on in [dev/image-history branch](https://github.com/Coteh/simpleimage/tree/dev/image-history))\n* No option for anonymous users to upload an image with ability to delete\n    * Delete links based on user session are being considered (which is what imgur does as well)\n* See [Issues](https://github.com/Coteh/simpleimage/issues) page for more\n\n## Future Additions\n\n* User preferences menu\n* Ability to change email and/or username\n* Image galleries\n* Custom image IDs\n* Delete account\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoteh%2Fsimpleimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoteh%2Fsimpleimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoteh%2Fsimpleimage/lists"}