Skip to content

A free and open-source ASP.NET Web API for developers to query and interact with South Africa’s 1996 Constitution. Designed for civic tech, legal tools, and educational platforms.

License

Notifications You must be signed in to change notification settings

moppdev/ZAConstitution1996

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZAConstitution1996

.NET Swagger

Table of Contents

Description and Background

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.

Tech Stack

  • .NET 9
  • C# with ASP.NET Core Web API
  • Entity Framework Core
  • SQL Server
  • Serilog
  • Swagger

Getting Started

Database

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.

API

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.

Documentation

The documentation for the API can be found here.

Contributing

Pull requests are welcome. Please check contribution.md for more information.

License

This project is licensed under the MIT License.

About

A free and open-source ASP.NET Web API for developers to query and interact with South Africa’s 1996 Constitution. Designed for civic tech, legal tools, and educational platforms.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks