Skip to content

Commit

Permalink
first push to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
abishekmuthian committed Nov 24, 2022
0 parents commit d31f123
Show file tree
Hide file tree
Showing 2,419 changed files with 271,018 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
@@ -0,0 +1,12 @@
*-workspace
bin/*
db/backup/*
log/*
certs/*
vendor
secrets/*
public/assets/scripts/app-*
public/assets/styles/app-*
public/assets/images/projects/*
open-payment-host
.vscode/*
22 changes: 22 additions & 0 deletions LICENSE
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Mechanism Design Ltd

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.

49 changes: 49 additions & 0 deletions README.md
@@ -0,0 +1,49 @@
# open-payment-host
A responsive news website for links about the Go programming language, written in Go. You can see a this website in action at this link:

[http://open-payment-host.com](http://open-payment-host.com)

## Gettting Started

The app requires postgresql just now to bootstrap locally (not Mysql). So make sure you have psql installed. The bootstrap process will create a database and settings for you, but you'll need to promote the first user to admin in order to use the site locally.

Go get this app:

go get -u github.com/kennygrant/open-payment-host

Then to build and run the server locally, as you'd expect:

go run server.go

or get the fragmenta command line tool (for things like migrations, deploy etc) and run it with that:

go get -u github.com/fragmenta/fragmenta
fragmenta server



## App Structure

#### server.go
This is the entry point main() for the application. It includes packages within src and starts a server.

#### The src folder
This holds the website assets, actions and views - the meat of the app.

#### The src/app folder
This contains general app files, resources like pages or users should go in a separate pkg.

#### The src/users folder
This contains files related to users on the website.

#### The src/projects folder
This contains files related to projects on the website.

#### The src/comments folder
This contains files related to comments on the website.

#### The src/lib folder
lib is used to store utility packages which can be used by several parts of the app.

#### The src/lib/templates folder
Templates for generating new resources are stored in here and used by fragmenta generate to generate a new resource package, containing assets, code and views for the resource.
Binary file added __debug_bin
Binary file not shown.
Binary file added db/.DS_Store
Binary file not shown.
92 changes: 92 additions & 0 deletions db/Create-Tables.sql
@@ -0,0 +1,92 @@
CREATE TABLE IF NOT EXISTS products (
id integer primary key autoincrement,
created_at text,
updated_at text,
tweeted_at text,
status integer,
name text,
url text,
download_url text,
rank integer,
summary text,
description text,
user_id integer,
user_name text,
points integer,
comment_count integer,
emailed_at text,
all_time_page_views integer,
all_time_top3_countries text,
seven_days_page_views integer,
seven_days_top3_countries text,
insights_updated text,
subscribers text,
thirty_days_page_views integer,
thirty_days_top3_countries text,
shared boolean,
price text,
mailchimp_audience_id text
);

CREATE TABLE IF NOT EXISTS users (
id integer primary key autoincrement,
created_at text,
updated_at text,
status integer,
role integer,
email text,
password_hash text,
password_reset_at text,
password_reset_token text
);

CREATE TABLE IF NOT EXISTS subscriptions (
id integer primary key autoincrement,
created_at text,
updated_at text,
txn_id text,
txn_type text,
transaction_subject text,
business text,
custom text,
invoice text,
receipt_ID text,
first_name text,
handling_amount real,
item_number text,
item_name text,
last_name text,
mc_currency text,
mc_fee real,
mc_gross real,
payer_email text,
payer_id text,
payer_status text,
payment_date text,
payment_fee real,
payment_gross real,
payment_status text,
payment_type text,
protection_eligibility text,
quantity integer,
receiver_id text,
receiver_email text,
residence_country text,
shipping real,
tax real,
address_country text,
test_ipn integer,
address_status text,
address_street text,
notify_version real,
address_city text,
verify_sign text,
address_state text,
charset text,
address_name text,
address_country_code text,
address_zip integer,
subscr_id text,
user_id integer,
test_pdt integer
);
Binary file added db/migrate/.DS_Store
Binary file not shown.
Empty file added db/migrate/.keep
Empty file.
Binary file added db/oph.db
Binary file not shown.
Binary file added db/oph.db-shm
Binary file not shown.
Binary file added db/oph.db-wal
Binary file not shown.
40 changes: 40 additions & 0 deletions go.mod
@@ -0,0 +1,40 @@
module github.com/abishekmuthian/open-payment-host

go 1.19

require (
github.com/bamiaux/rez v0.0.0-20170731184118-29f4463c688b
github.com/fragmenta/mux v1.6.7
github.com/go-resty/resty/v2 v2.7.0
github.com/go-sql-driver/mysql v1.6.0
github.com/gorilla/schema v1.2.0
github.com/influxdata/influxdb v1.10.0
github.com/kennygrant/sanitize v1.2.4
github.com/lib/pq v1.10.7
github.com/mattn/go-sqlite3 v1.14.16
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450
github.com/sendgrid/sendgrid-go v3.12.0+incompatible
github.com/stripe/stripe-go/v72 v72.122.0
golang.org/x/crypto v0.2.0
google.golang.org/api v0.103.0
)

require (
cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.1 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/sendgrid/rest v2.6.9+incompatible // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

0 comments on commit d31f123

Please sign in to comment.