Giter Site home page Giter Site logo

osmium8 / async-image-upload Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.2 MB

Gallery app, upload images.

JavaScript 2.30% TypeScript 45.44% HTML 11.10% CSS 0.89% Python 40.27%
celery celery-redis django django-rest-framework firebase gallery-app

async-image-upload's Introduction

Async Image Gallery

This repo contains frontend(Angular) and backend(Django DRF) of an SPA.

High Level Design

Frontend

Screenshots:

Home Upload Dialog Auth(Login) Auth(Register)

setup:

(start backend server first)

  1. cd frontend
  2. npm i to install dependencies
  3. ng serve

Backend

database design:

Note:

  1. Project name is flagship
  2. 3 apps: common, gallery and user

Setup:

  1. create venv, using python -m venv venv

  2. activate the environment

    Ubuntu `source venv/bin/activate`
    Windows Powershell `venv\Scripts\Activate.ps1`
    Windows CMD `venv\Scripts\activate.bat`
  3. install dependencies pip install -r requirements.txt

  4. connect with local MySQL instance at flagship/flagship/settings/dev.py

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': '<schema_name>',
            'USER': '<user_name>',
            'PASSWORD': '<password>',
            'HOST':'localhost',
            'PORT':'3306',
        }
    }
    
    # change redis server's port, default is 6379
    CELERY_BROKER_URL = "redis://localhost:6379"
    CELERY_RESULT_BACKEND = "redis://localhost:6379"
    
  5. set firebase storage credentails at ./flagship/common/storage.py

    cred = credentials.Certificate("C:\\Path\\to\\key")
    firebase_admin.initialize_app(cred, {
        'storageBucket': '<your-app-url>.appspot.com'
    })
    
  6. start redis server

    > redis-server
    
  7. start celery client (call this inside ./flagship)

    > celery --app=flagship  worker -l INFO --pool=solo
    
  8. make migrations, migrate and runserver

    cd
    python manage.py makemigrations
    python manage.py migrate
    
    python manage.py runserver 8000

async-image-upload's People

Contributors

osmium8 avatar

Watchers

 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.