garious / icontrib Goto Github PK
View Code? Open in Web Editor NEWA website for managing charitable giving
License: BSD 3-Clause "New" or "Revised" License
A website for managing charitable giving
License: BSD 3-Clause "New" or "Revised" License
Move this Makefile option to your local which ghc
:
-optl"-Wl,-read_only_relocs,suppress"
Since we don't have a good mechanism for stringing together git repos at this time, let's organize this one such that each top-level directory represents a package. So, let's move all the .hs files into their own directory.
Our naming convention for directories has been lowercase, but let's follow Haskell's lead and switch to CamelCase with the first letter capitalized. We will have many reusable packages at this directory level, so we'll want this one to have a specific name like 'IContribServer'
Resource interpreted as Script but transferred with MIME type binary/octet-stream.
check_user GET http://icontrib.org/check_user 404 (Not Found)
In nav/nav.js, instead of this:
$.ajax({
type: "GET",
url: "/check_user",
dataType: "json",
success: function(data) {
loginForm.innerHTML = data;
}
});
Add '/user_state.json' to the list of external dependencies for the module, and rename the resource in the server to return that same data.
/auth/add should imply a call to /auth/donor, setting 'email' and the 'owner' to the text to the left of the email's @. All other fields may be blank.
If this does not happen as an atomic operation, then we end up in the situation where the user has a valid cookie, but /donor/username.json returns a 404.
After implementing this, please update the TODO in Client/SignUp.js
goodbye jquery, hello yoink.js and composable widgets
Replace homepage with the profile page of the "most influential" donor's profile, and the ability to navigate to other influential donors.
Add a button to align with the donor. If the user is not logged in, show a popup that gives them the option to either log in or continue building their distribution. We don't need to ask the user to create an account until they want to save or fund their distribution.
At the very bottom of the page, there should be small links for "Join our charity network" and "Corporate Matching". Same concept as the links in the bottom-right of Facebook. Not distracting, but available.
no need for HTML anymore. The webserver now generates an HTML wrapper so that javascript need only return the top-level DOM node
Can you get these files out of the 'public' directory? Also, rename them to use their unique identifier, and update any references to them in the static .json files.
$ find public -iname "*.jpg"
public/charity/gffw.jpg
public/charity/usoa.jpg
public/donor/elisarossi.jpg
public/donor/eric.jpg
public/donor/gregf.jpg
public/donor/tombrown.jpg
When the user presses "align", show a popup of the pie chart. All charities but the current one should be read-only by default.
I'd like to share the website openly at icontrib.org, but we need to be very upfront about the current state of affairs - that this is a demo!
And could you change the names of the organizations to some that are clearly not real?
import Control.Concurrent (forkIO, killThread)
main :: IO ()
main = do
tid <- forkIO webThread
putStrLn "started. Press to exit."
_ <- getLine
killThread tid
webThread :: IO ()
webThread = withAcid Nothing (simpleHTTP nullConf . site "http://localhost:8000/")
Bad:
define(['jquery.js', 'myJQueryPlugin.js'], function($, _) {
var div = document.createElement('div');
return $(div).myWidget();
});
Better:
define(['myWidget.js'], function(W) {
return W.myWidget();
});
jquery plugins will need to be wrapped, but will get much better performance for everyone that doesn't utilize jquery's awkward plugin model. The former only works because:
instead, yoink will go back to interpreting modules as soon as it receives them, which will allow it to start downloading its own dependencies as quickly as possible instead of waiting for the slowest download to complete.
From the donor dashboard, the user should be able to modify the percentage of any charity. The user should be able to pin any charity so that its percentage does not change when others change.
We need a charity signup form. It should include:
Design and implement a JavaScript module format that can be rendered as an HTML page.
For example, user requests: "/widgets/myfav"
widgets/myfav.js contains:
return document.createTextNode("hello world");
returned HTML is:
<html>
<body>
<script src="yoink/yoink.js"></script>
<script>
YOINK.getResource('/widgets/myfav.js', function(node) {
document.body.appendChild(node);
});
</script>
</body>
</html>
url: widgets/myfav?a=123&b=234
generates HTML that expects:
return function(a,b) {
return document.createTextNode("hello world");
}
url: widgets/myfav/main?a=123&b=234
generates HTML that expects:
return {
main: function(a,b) {
return document.createTextNode("hello world");
}
}
No dice:
XMLHttpRequest 'https://www.google.com/jsapi'
because it results in:
"XMLHttpRequest cannot load https://www.google.com/jsapi. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin."
instead, add server-side support for:
'/proxy?url=https://www.google.com/jsapi'
The IRS publishes a list of all non-profit charities that file taxes in Publication 78. You can download a list of all the charities in a single file every quarter.
To download:
http://www.irs.gov/charities/article/0,,id=96136,00.html
Explains what publication 78 is:
http://www.irs.gov/irm/part25/irm_25-007-006.html
The server says only "Internal Error" on stdout and, by the looks of it, doesn't send back an "internal server error" HTTP reply.
"make" should run the unit tests.
"make serve" should depend on 'all' and then start up the server on localhost:8000
"make serve PORT=8001" should start the server on port 8001
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.