sTeam REST API

 FOSSASIA bring’s people together to share, create, develop and make things with Open Technologies and software. We organize science hack labs, Open Tech events, meetups and coding programs with developers, designers and contributors.
FOSSASIA bring’s people together to share, create, develop and make things with Open Technologies and software. We organize science hack labs, Open Tech events, meetups and coding programs with developers, designers and contributors.
 Checkout the FOSSASIA Idea’s page for more information.
 (ˢᵒᶜⁱᵉᵗʸserver) aims to be a platform for developing collaborative applications.
 sTeam server project repository: sTeam.
 sTeam-REST API repository: sTeam-REST
Documentation
Documentation is an important part of software engineering. Types of documentation include:
- Requirements – Statements that identify attributes, capabilities, characteristics, or qualities of a system. This is the foundation for what will be or has been implemented.
- Architecture/Design – Overview of software. Includes relations to an environment and construction principles to be used in design of software components.
- Technical – Documentation of code, algorithms, interfaces, and APIs.
- End user – Manuals for the end-user, system administrators and support staff.
- Marketing – How to market the product and analysis of the market demand.
Doxygen


pike -x extract_autodoc /sourcepike -x autodoc_to_html /src /opfile#!/bin/bash  
shopt -s globstar  
for filename in ./**/*.pike.xml; do  
    outputFile=doc/${filename#./}  
    outputFile=${outputFile%.xml}."html"  
    if [ -d $(dirname "./"$outputFile) ]; then  
      touch "./"$outputFile  
    else  
      mkdir -p $(dirname "./"$outputFile) && touch "./"$outputFile  
    fi  
    pike -x autodoc_to_html $filename "./"$outputFile  
done  
Autodoc Documentation
  The documentation generated by this was less informative and lacked the referrals to other classes and headers. The societyserver project was developed long back but the autodoc utility was introduced in the later versions of pike. As a result the source files lacked the autodoc tags which are required to generate a well informative documentation with bindings to other files.
The documentation generated by this was less informative and lacked the referrals to other classes and headers. The societyserver project was developed long back but the autodoc utility was introduced in the later versions of pike. As a result the source files lacked the autodoc tags which are required to generate a well informative documentation with bindings to other files.
Restructuring the sTeam-REST API
The sTeam-REST API project made use of the angular-seed to initiate the development during the early phases. However these files still existed in the project. This had lead to a pandemonium and created difficulty in understanding the project. The files had to be removed and the app was in dire need of a restructuring. The following issues have been reported and resolved.
| Issue. | Github Issue | Github PR | 
|---|---|---|
| sTeam-REST Issues | Issues | PR | 
The new UI can be seen below.
Home

Register

About

Testing the REST API
The functionality to run the tests using the npm test command was added to the project. Now the user can run the tests using these commands instead of the traditional approach of running the tests using jasmine-node and specifying the test directory. The domain name of the urls to which the request was sent was changed. The e2e tests and frisby tests were conducted successfully.
e2e Tests.

Frisby Tests

The next step would be to do add more tests for the REST API.
Feel free to explore the repository. Suggestions for improvements are welcomed.