Giter Site home page Giter Site logo

caseygram's Introduction

caseygram

caseygram is an Instagram clone built using Django, Bootstrap, and jQuery. I recreated many of Instagrams features including: CRUD capabilties on posts, explore page, likes, comments, direct messaging, profiles, profiles pictures, bios, search bar, and followers/following categories. I used Bootstrap to recreate the UX of instagrams desktop page that changes for mobile use. jQuery is used to make real-time like/follower/following updates using AJAX calls.

Check out the website at (https://caseygram.herokuapp.com/)

Getting Started

  1. Open up Terminal, and go into the directory where you want Caseygram to run
cd projects
  1. Download a copy
git clone https://github.com/cdelange/caseygram.git
  1. Install a virtual environment
pip install virtualenv
  1. Make a folder for your virtual environments e.g.
mkdir ~/venvs
  1. Make a new virtual environment for this project
virtualenv --system-site-packages ~/venvs/caseygram
  1. Start the virtual environment
source ~/venvs/caseygram/bin/activate
  1. Generate a secret key for your django app using
python

then

from django.utils.crypto import get_random_string

then

chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'

then

get_random_string(50, chars)

and then

quit()
  1. Copy this result and in your caseygram/caseygram/settings.py file replace
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')

with

SECRET_KEY = 'generated key'
  1. Go into the directory containing 'requirements.txt'
cd caseygram
  1. Install the Python requirements
pip install -r requirements.txt
  1. Make migrations to set up the database
python manage.py makemigrations

Then run these migrations

python manage.py migrate
  1. Create a user profile to login with
python manage.py createsuperuser
  1. Once you have followed the instructions to create a user, run the server
python manage.py runserver
  1. Now go to http://localhost:8000/ in your browser to view caseygram

Unit Tests

I have a handful of unit tests written for testing messages and posts.

class MessageTestCase(TestCase):

    def create_message(self, sender=User.objects.get(id=1), receiver=User.objects.get(id=2), content='test message'):
        return Message.objects.create(sender=sender, receiver=receiver, content=content, date_created=timezone.now())
    
    def test_message_creation(self):
        message = self.create_message()
        self.assertTrue(isinstance(message, Message))
        self.assertEqual(message.__str__(), message.content)

Deployment

caseygram is deployed on Heroku.

Built With

Authors

Additional Plans

  • Add more infinite scroll capabilities
  • Use AWS Lambda to resize my current S3 bucket images to smaller formats
  • Fix notification server error with comment deletion
  • alternate new account image so there is not 100 of the same image.
  • formatting the comment system to not spill over the container
  • comment text field on image page. and use ajax to submit comment and update in real time

caseygram's People

Contributors

cdelange avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.