Skip to content

Commit

Permalink
add lf
Browse files Browse the repository at this point in the history
  • Loading branch information
Suryansh5545 committed Aug 5, 2023
1 parent 44abf01 commit 317a463
Show file tree
Hide file tree
Showing 180 changed files with 14,128 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bower_components
env
elasticmq-server-0.14.2.jar
examples
media
node_modules
static
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E501, W503, F403
exclude = frontend/node_modules/
30 changes: 30 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Django CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11]
environment: dev
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Run Tests
run: |
pytest
233 changes: 233 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/django,angular,yarn
# Edit at https://www.toptal.com/developers/gitignore?templates=django,angular,yarn

### Angular ###
## Angular ##
# compiled output
dist/
tmp/
app/**/*.js
app/**/*.js.map

# dependencies
node_modules/
bower_components/
*package-lock.json

# IDEs and editors
.idea/

# misc
.sass-cache/
connect.lock/
coverage/
libpeerconnection.log/
npm-debug.log
testem.log
typings/
.angular/

# e2e
e2e/*.js
e2e/*.map

# System Files
.DS_Store/

### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
db.sqlite3-journal
media

# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
# in your Git repository. Update and uncomment the following line accordingly.
# <django-project-name>/staticfiles/

### Django.Python Stack ###
# Byte-compiled / optimized / DLL files
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo

# Django stuff:

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
**.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### yarn ###
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/releases
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# if you are NOT using Zero-installs, then:
# comment the following lines
!.yarn/cache

# and uncomment the following lines
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/django,angular,yarn

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

# Docker Environment Files
docker/prod/docker_staging.env
docker/prod/docker_production.env

# Visual Studio
.vscode/
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Ticketify

A System Made to Sell Event Tickets

# For whom is this system build?
This is build for the purpose of being a checkout page for events which doesn't have there own dedicated checkout page.

# Where did the idea came from to create this?
The idea to create this came from the fact that many fest/events hosted by colleges speically uses manual methods like asking customers to fill a google form and then using excel for check in purposes. This method is very ineffective and require significant manpower. I was a part of this ineffective system last year when my college did the similar thing and put up a google form for ticket selling, with qr code of a upi account put up as a image to scan then give the transaction id.


# What features does this system have?
1. Ticket Generation with QR Code Support
2. QR Scanning using WebCam from Admin panel
3. Integration with Payment Gateways like Razorpay, Phonepe(Under Development)
4. Sub Events support (If a fest have its own internal event which require another fee)
5. Addon Items Support (Anything that is limited in stock and doesn't fit the category of Sub Events)
6. Admin Page with Stats for Ticket Sale, Sub Event Sale, Addon and Total Check IN.
7. Android APP for QR Scanning (A Anroid app will be far more faster and better at this then a webcam)(Under Development).
8. Celery worker support to handle heavy task of ticket image generation.
9. Webhooks to detect initation of Dispute or refund and disable the ticket or payment captured in case of late capture. This will mark the ticket paid and send a email to customer.(Razorpay Only for now)
10. Constnat Evaluation of all ticket sold for the active event to check for there payment status. Which will make sure that all scenerios are covered of transaction failure or late success. (Razorpay Only for now)

# Is the system stable and tested for commercial use?
As of now the System is not finished for a live production usage, i will update as soon as we can declare it stable.
I am currently in process of getting a staging environment up for testing and a production environment for our upcoming Live Test run, with Sabrang 2023 at JKLU University.

# Installation
Setting up Ticketify on your local machine is really easy. You can setup Ticketify using docker: The steps are:
1. install [docker](https://docs.docker.com/install/) on your machine.

2. Get the source code on to your machine via git.

```shell
git clone https://github.com/Suryansh5545/Ticketify.git ticketify && cd ticketify
```

3. Build and run the Docker containers. This might take a while.

```
docker compose up --build
```
4. To Test Email support or Razorpay integration edit the docker.env.example file and rename the new one to docker.env
5. That's it. Open web browser and hit the URL [http://127.0.0.1:4200](http://127.0.0.1:4200). One user is created by default which are listed below -
**SUPERUSER-** username: `admin` password: `password`
If you are facing any issue during installation, please feel free to reach out to me by mail [suryanshpathak5545@gmail.com](mailto:suryanshpathak5545@gmail.com)
# Planned Updates
1. Addition of more payment gateways Paytm and Phonepe(Under Development).
2. Android APP (Under Development).
3. Test Cases for most of the critical functions.
4. Addition of a organizer user to be able to add event without admin help from frontend.
5. Ability to host mutliple concurrently active events on the same site.
# Screenshot (Early Development Phase)
![image](https://github.com/Suryansh5545/Ticketify/assets/34577232/1874be8f-f40d-4038-abc4-479b9cbd53b9)
![image](https://github.com/Suryansh5545/Ticketify/assets/34577232/62f31e56-ebfe-41b3-9cba-54f108022571)
![image](https://github.com/Suryansh5545/Ticketify/assets/34577232/631b3526-236a-4aff-bceb-0f7868f383d8)
![image](https://github.com/Suryansh5545/Ticketify/assets/34577232/9bb1fc2d-e409-401a-88c1-8f22e3e1b6be)
![image](https://github.com/Suryansh5545/Ticketify/assets/34577232/6f20f547-0a2a-4f52-a20b-af1c35f439de)
Empty file added apps/__init__.py
Empty file.
Empty file added apps/base/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions apps/base/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions apps/base/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class BaseConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'base'
Empty file.
22 changes: 22 additions & 0 deletions apps/base/management/commands/seed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from django.core.management import BaseCommand, call_command


class Command(BaseCommand):

help = "Seeds the database with random but sensible values."

def add_arguments(self, parser):
parser.add_argument(
"-nc",
nargs="?",
default=20,
type=int,
help="Number of challenges.",
)

def handle(self, *args, **options):
self.nc = options["nc"]
self.stdout.write(
self.style.SUCCESS("Starting the database seeder. Hang on...")
)
call_command("runscript", "seed", "--script-args", self.nc)
Empty file.
3 changes: 3 additions & 0 deletions apps/base/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
Loading

0 comments on commit 317a463

Please sign in to comment.