-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from codescalersinternships/development
Secret-Note-MVC
- Loading branch information
Showing
37 changed files
with
1,498 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Django CI/CD | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
cd SecretNote | ||
pip install -r requirements.txt | ||
cd .. | ||
- name: Run Tests | ||
run: | | ||
cd SecretNote | ||
python manage.py test | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Created by https://www.gitignore.io | ||
|
||
### OSX ### | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear on external disk | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# 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/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
|
||
### Django ### | ||
*.log | ||
*.pot | ||
*.pyc | ||
__pycache__/ | ||
local_settings.py | ||
|
||
.env | ||
db.sqlite3 | ||
.vscode | ||
SecretNote/*/migrations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
django = "*" | ||
django-debug-toolbar = "*" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.10" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# Secret-Note-MVC-Rawan-Mostafa | ||
# Secret-Note Application | ||
|
||
This repository implements a Secret Note Sharing Application, it's a web application that allows users to securely share self-destructing secret notes. | ||
|
||
The notes are created with a random url that can't be easily guessed, has self destruction feature using maximum views or expiration time | ||
|
||
## Table of Contents | ||
|
||
- [features](#features) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
|
||
## Features | ||
- Note Creation : | ||
|
||
- Users can create a note with text content | ||
- Generate a unique, secure URL for each note | ||
- Set an expiration time or number of views before destruction | ||
- Note Retrieval : | ||
|
||
- Users can view a note using the unique URL | ||
- After viewing or upon expiration, the note is permanently deleted | ||
- Security Features: | ||
|
||
- We use secure random generation for URLs so that the urls aren't predictable | ||
|
||
## Installation | ||
|
||
Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/codescalersinternships/Secret-Note-MVC-Rawan-Mostafa.git | ||
``` | ||
|
||
## Usage | ||
Run the docker container using docker-compose | ||
```bash | ||
docker-compose up | ||
``` | ||
You'll then find the url of your app printed in the terminal, and here you go you can signup and start making notes securely! | ||
|
||
![alt text](image.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM python:3.10 | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
WORKDIR /code | ||
|
||
COPY requirements.txt . | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
ASGI config for SecretNote project. | ||
It exposes the ASGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.asgi import get_asgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SecretNote.settings') | ||
|
||
application = get_asgi_application() |
Oops, something went wrong.