Skip to content

Commit 4dd0743

Browse files
README.md modified
1 parent 250ad03 commit 4dd0743

File tree

1 file changed

+60
-34
lines changed

1 file changed

+60
-34
lines changed

README.md

Lines changed: 60 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients
1+
# authOauth
22

3-
This is an example project, ready to use. This project is using below Symfony Bundles:
3+
**A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients.**
4+
5+
This is an example project, ready to use, based upon **Symfony 2.8** but can be easily adapted to higher Symfony versions. This project is using below Symfony Bundles:
46

57
* [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle)
68
* [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle)
@@ -12,40 +14,45 @@ This is an example project, ready to use. This project is using below Symfony Bu
1214
The salient features of this Project are:
1315
* This project consists of **API (currently, user management only) for Frontend consumption, via iPhone and Android Mobiles**, and an **administrative web based Backend system**.
1416
* The APIs and the Backend system are **internationalization enabled**. Project currently supports English, French and Hindi but can be easily extended to include other languages.
15-
* This project implements FOSRestBundle **API versioing system** via custom header "X-Accept-Version". Currently, the running API version is 1.0.
17+
* This project implements FOSRestBundle **API versioing system** via custom header **"X-Accept-Version"**. Currently, the running API version is 1.0.
1618
* **Backend theming can easily be customized and extended**. Options have been provided to pick desired front-end theme for the Backend. The choices available are - Bootstrap, Materialize and Skeleton. **To change the theme, modify key "fronend_theme" in parameters.yml accordingly.** However, the design is open-ended and you may add your preferred theme easily. Please also note that theming has only been provided for base and nav. Other top level stuff is using bootstrap, you can theme as per your choice using base theme.
1719
* The Web user management pages are coming directly from FOSUserBundle views. You may override these pages, per your need.
1820

19-
## Installation Steps:
20-
21-
**Step 0:**
22-
23-
Below environment is required:
24-
Linux
25-
=====
26-
- PHP 5.6
27-
- MySql (though other DB can also be used with a little change in the configuration)
28-
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
29-
- Composer
30-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
31-
32-
Windows
33-
=======
34-
- MAMP
35-
- Composer
36-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
37-
38-
Mac
39-
===
40-
- MAMP
41-
- Composer
42-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
21+
# Table of Contents
22+
* [Requirements](#requirements)
23+
* [Installation](#installation)
24+
* [Configuring Apache2](#configure-apache2)
25+
* [Using the Package](#using-this-package)
26+
* [Roadmap](#roadmap)
27+
* [Change Logs](#change-logs)
28+
* [Contribution Guidelines](#contribution-guidelines)
29+
30+
# <a name="requirements"></a>Requirements
31+
32+
Below environment is required:
33+
34+
* Linux
35+
- PHP 5.6
36+
- MySql (though other DB can also be used with a little change in the configuration)
37+
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
38+
- Composer
39+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
40+
* Windows
41+
- MAMP
42+
- Composer
43+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
44+
* Mac
45+
- MAMP
46+
- Composer
47+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
4348

4449
***Note regarding Webserver:***
4550

46-
As this project uses OAuth2 server, for smooth results, Apache webserver is highly recommended. You may want to create a site, say http://auth.dev, for it. Please refere to section **"Configuring Apache"** below for an example implementation.
51+
As this project uses OAuth2 server, for smooth results, Apache webserver is highly recommended. You may want to create a site, say http://auth.dev, for it. Please refere to section [Configuring Apache2](#configure-apache2) below for an example implementation.
4752

48-
However, if you wish to use php local dev server, you will need to start two instances of php local dev server at two different ports (say 8000 and 8080) in two separate terminal windows/tabs, section **"Use this Package"**, and replace oauth urls accordingly in Step 2 below. This is necessary as php local dev server is a simple single threaded web server and oAuth server needs to work on more than one process simultaneously. Using a single local dev server severly hampers this and blocks execution.
53+
*However, if you wish to use php local dev server, you will need to start two instances of php local dev server at __two different ports (say 8000 and 8080)__ in two separate terminal windows/tabs, section [Using the Package](#using-this-package), and replace oauth urls accordingly in Step 2 below. This is necessary as php local dev server is a simple single threaded web server and oAuth server needs to work on more than one process simultaneously. Using a single local dev server severly hampers this and blocks execution.*
54+
55+
# <a name="installation"></a>Installation
4956

5057
**Step 1 - Clone the project:**
5158

@@ -97,7 +104,7 @@ However, if you wish to use php local dev server, you will need to start two ins
97104

98105
Now you are ready to use the Package!
99106

100-
## Configure Apache2
107+
# <a name="configure-apache2"></a>Configuring Apache2
101108

102109
Execute below commands which are specific to Apache2 configuration on Ubuntu 16.04. However, for rest of the env, the detail are quite similar.
103110

@@ -168,14 +175,15 @@ $ sudo setfacl -dR -m u:www-data app/cache app/logs
168175
$ sudo chmod -R ogu+rwx app/cache app/logs web
169176
```
170177

171-
## Use this Package
178+
# <a name="using-the-package"></a>Use the Package
172179

173180
1. Test API
174181
2. Use API via a Mobile Client
175182
3. Backend Administration
176-
4. Troubleshooting
177183

178-
If you are using php local dev server, please start the server at two different ports (say 8000 and 8080) in two terminal windows as below:
184+
```
185+
186+
Please refer to **Note regarding webserver** in [Requirements](#requirements) section. If you are using php local dev server, please start the server at two different ports (say 8000 and 8080) in two terminal windows as below:
179187
180188
In first terminal window,
181189
@@ -191,6 +199,8 @@ You may also need to configure parameters.yml accordingly. Then in a browser, yo
191199
192200
Alternatively, if you have successfully configured Apache2, then modify parameters.yml accordingly can start using the package vide say, http://auth.dev.
193201
202+
```
203+
194204
#### 1. Test API
195205

196206
You can test the provided API via curl or Postman. Here we provide as to how to use Postman.
@@ -213,7 +223,7 @@ Separate sample Github repos are available for iPhone and Android Mobile Clients
213223

214224
In a browser, goto the package site by http://127.0.0.1:8000. This is the Backend Administration tool and can be plugged into any User App easily. It is a simple page. The options are self explanatory.
215225

216-
#### 4. Troubleshooting
226+
# <a name="troubleshooting"></a>Troubleshooting
217227

218228
Sometimes, you may run into permission issues. You may try below commands, single or in combination:
219229

@@ -226,3 +236,19 @@ $ sudo rm -rf app/cache/* app/logs/*
226236
227237
$ sudo chmod -R ogu+rwx app/cache app/logs web
228238
```
239+
240+
# <a name="roadmap"></a>Roadmap
241+
242+
Here's the TODO list for the next release (**2.0**).
243+
244+
* [ ] Refactoring the UserController to have a single UserController instead of two separate UserControllers for admin and regular user.
245+
* [ ] Refactoring the UserController to use API from AuthController instead using FOSUserBundle so that CRUD comes from a single source.
246+
* [ ] Add provision for admin to reset password for a user.
247+
248+
# <a name="change-logs"></a>Change Logs
249+
250+
# <a name="contribution-guidelines"></a>Contribution Guidelines
251+
252+
Support follows PSR-2 PHP coding standards, and semantic versioning.
253+
254+
Please report any issue you find in the issues page.

0 commit comments

Comments
 (0)