The Wifidog project is a complete and embeddable captive portal solution for those who wish to operate a open hotspot or network of hotspots while preventing abuse of their Internet connection.
The portal suite is mainly an authentication server coded in PHP using a PostgreSQL database. On the other side, the Wifidog gateway connects to the auth-server for directive based on information submited by users in one of the hotspots. All administration/logical stuff are in the authentication server and the gateway is only playing with gateway firewall rules to allow or deny the users access.
Also of note are the extensive LBC (location-based content) management features available. There are some LBS (location-based service) features available and they continue to be an area of development.