ZAConstitution1996 is an ASP.NET Web API project that envisions providing public, on-demand, easy access to the contents of South Africa's 1996 Constitution that is currently in force. The goal of this project is to make the Constitution easily accessible to developers to create solutions that make it easier for the public to access and understand its contents.
The inspiration for this came from my own struggles to look up sections of the Constitution whenever they were mentioned in the news, whether about court cases or controversial Bills like the Expropriation Act. I often had to rely on my hard copy of the Constitution (which not everyone has) or find a government-hosted PDF version (which isn’t always reliable or easy to navigate).
I thought it was quite the schlep to do, so I wondered, "Isn't there an easier way to do this?". I searched GitHub and found a few Markdown versions of the Constitution, but they didn’t really solve the accessibility issue. I then decided to build this API.
- .NET 9
- C# with ASP.NET Core Web API
- Entity Framework Core
- SQL Server
- Serilog
- Swagger
Find the T-SQL scripts procedures.sql
(creates stored procedures used in the API) and constitution.sql
(creates and seeds the database) in the SQLServerScripts folder in this repository.
I used SQL Server Management Studio (SSMS) to create and run these scripts although you're welcome to use any other method to run these scripts on your local SQL Server instance.
First off, clone this repository via entering the following in your terminal of choice:
git clone https://github.com/moppdev/ZAConstitution1996.git
Navigate to the folder where the repository has been cloned to, and then to the Constitution1996 folder:
cd ZAConstitution1996/Constitution1996API
Run the following command to install packages:
dotnet restore
To run the API, run the following command:
dotnet watch run
It should open a tab in your default browser on your local machine at http://localhost:5056
and route to the Swagger documentation automatically.
The documentation for the API can be found here.
Pull requests are welcome. Please check contribution.md for more information.
This project is licensed under the MIT License.