Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej Onufrak committed Dec 7, 2023
0 parents commit f1b5f01
Show file tree
Hide file tree
Showing 14 changed files with 1,234 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/GitHubActions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: GitHub Actions

on:
push:
tags:
[ 'v**' ]

jobs:
Image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: |
bun install
docker build -t ${{ secrets.DOCKERHUB_REPOSITORY_NAME }}/safe:${{ github.ref_name }} -f ./Dockerfile .
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }}
docker push ${{ secrets.DOCKERHUB_REPOSITORY_NAME }}/safe:${{ github.ref_name }}
172 changes: 172 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# IntelliJ based IDEs
.idea
17 changes: 17 additions & 0 deletions Code of Conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Code of Conduct

## Our public Safe information sharing tool with MIT License is committed to creating a safe and inclusive community for all contributors, users, and maintainers. As such, we have established this code of conduct that applies to all members of our community. By contributing to or using our tool, you agree to abide by this code of conduct.

- Respectful and Inclusive Behavior: We value and respect diversity in all forms and will not tolerate any form of discrimination, harassment, or bullying based on race, ethnicity, gender identity or expression, sexual orientation, disability, religion, age, or any other characteristic protected by law. We are committed to providing a welcoming and inclusive environment to all community members.

- Professional Conduct: We expect all members of our community to conduct themselves in a professional and courteous manner. We will not tolerate any behavior that is disrespectful, disruptive, or harmful to other community members or to the tool itself. This includes, but is not limited to, trolling, flaming, personal attacks, or any other form of aggressive or hostile behavior.

- Open Communication: We encourage open and constructive communication within our community. We value feedback and welcome constructive criticism. However, we do not tolerate any form of hate speech, bullying, or harassment.

- Collaborative Community: Our community is built on collaboration, and we value contributions from all members. We expect all community members to work together in a respectful and constructive manner to achieve our common goals.

- Legal Compliance: We expect all members of our community to comply with all applicable laws, including but not limited to, copyright law, data protection law, and privacy law. We will not tolerate any behavior that violates these laws or our licensing terms.

- Reporting and Enforcement: We take all reports of violations of this code of conduct seriously. If you witness or experience any behavior that violates this code of conduct, please report it immediately to the tool maintainers. We will investigate all reports and take appropriate action, which may include warning the offending party, temporarily or permanently banning the offending party from the community, or reporting the offending party to law enforcement.

## Thank you for contributing to and using our public Safe information sharing tool with MIT License. We look forward to building a strong, collaborative, and inclusive community together.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM oven/bun

RUN mkdir -p /home/app
WORKDIR /home/app
COPY . .

EXPOSE 8000
CMD ["bun", "start"]
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 GoodRequest

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# <img align="left" width="40" height="40" alt="GoodRequest, s.r.o." src="./favicon.png">Safe

**Safe** enables sharing **confidential information** with a limited **number of views** and **overall lifetime**.

## Features

🕸️ _Web Native_ frontend build with pure **HTML**, **CSS** and **JS**. <br>
🪶 _Simple_ and _lightweight_ single-file backend with **Bun**. <br>
🔏 _Fast_ and _secure_ data management with **Redis**.

## A (Very) Quick Start

Deploy the app in a Docker Compose stack with (non-persistent) **Redis** and (reverse proxy) **NGINX**.

Once deployed, open the app, input the data, stash it and share the generated **Safe** link as needed.

## Additional Resources

<img align="left" width="25" height="25" alt="Bun" src="https://seeklogo.com/images/B/bun-logo-A876328A1F-seeklogo.com.png">[**Bun**](https://bun.sh) documentation is available [here](https://bun.sh/docs).

<img align="left" width="25" height="25" alt="Bun" src="https://redis.io/images/favicons/favicon-32x32.png">[**Redis**](https://redis.io) documentation is available [here](https://redis.io/docs).

<img align="left" width="25" height="25" alt="Bun" src="https://www.docker.com/wp-content/uploads/2023/04/cropped-Docker-favicon-32x32.png">[**Docker**](https://www.docker.com) documentation is available [here](https://docs.docker.com).

<img align="left" width="25" height="25" alt="Bun" src="https://www.nginx.com/wp-content/uploads/2019/10/favicon-48x48.ico">[**NGINX**](https://www.nginx.com) documentation is available [here](https://nginx.org/en/docs/).

## License

**Safe** is released under the MIT license. See [LICENSE.md](./LICENSE.md) for details.
Binary file added bun.lockb
Binary file not shown.
Binary file added favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f1b5f01

Please sign in to comment.