|
1 |
| -<h1 align="center"><a href="https://api-platform.com"><img src="https://api-platform.com/logo-250x250.png" alt="API Platform"></a></h1> |
| 1 | +# api-platform.com |
2 | 2 |
|
3 |
| -API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility |
4 |
| -and flexibility: |
| 3 | +This repository contains the source code and documentation powering [api-platform.com](https://api-platform.com/). |
5 | 4 |
|
6 |
| -* Design your own data model as plain old PHP classes or [**import an existing ontology**](https://api-platform.com/docs/schema-generator). |
7 |
| -* **Expose in minutes a hypermedia REST or a GraphQL API** with pagination, data validation, access control, relation embedding, |
8 |
| - filters and error handling... |
9 |
| -* Benefit from Content Negotiation: [GraphQL](https://api-platform.com/docs/core/graphql/), [JSON-LD](https://json-ld.org), [Hydra](https://hydra-cg.com), |
10 |
| - [HAL](https://github.com/mikekelly/hal_specification/blob/master/hal_specification.md), [JSON:API](https://jsonapi.org/), [YAML](https://yaml.org/), [JSON](https://www.json.org/), [XML](https://www.w3.org/XML/) and [CSV](https://www.ietf.org/rfc/rfc4180.txt) are supported out of the box. |
11 |
| -* Enjoy the **beautiful automatically generated API documentation** ([OpenAPI](https://api-platform.com/docs/core/openapi/)). |
12 |
| -* Add [**a convenient Material Design administration interface**](https://api-platform.com/docs/admin) built with [React](https://reactjs.org/) |
13 |
| - without writing a line of code. |
14 |
| -* **Scaffold fully functional Progressive-Web-Apps and mobile apps** built with [Next.js](https://api-platform.com/docs/client-generator/nextjs/) (React), |
15 |
| -[Nuxt.js](https://api-platform.com/docs/client-generator/nuxtjs/) (Vue.js) or [React Native](https://api-platform.com/docs/client-generator/react-native/) |
16 |
| -thanks to [the client generator](https://api-platform.com/docs/client-generator/) (a Vue.js generator is also available). |
17 |
| -* Install a development environment and deploy your project in production using **[Docker](https://api-platform.com/docs/distribution)** |
18 |
| -and [Kubernetes](https://api-platform.com/docs/deployment/kubernetes). |
19 |
| -* Easily add **[OAuth](https://oauth.net/) authentication**. |
20 |
| -* Create specs and tests with **[a developer friendly API testing tool](https://api-platform.com/docs/distribution/testing/)**. |
| 5 | +Single Page Application built with [React](https://facebook.github.io/react/) and powered by [Next.js](https://nextjs.org/). |
21 | 6 |
|
22 |
| -[](https://github.com/api-platform/core/actions?workflow=CI) |
23 |
| -[](https://codecov.io/gh/api-platform/core/branch/master) |
| 7 | +[](https://travis-ci.org/api-platform/website) |
24 | 8 |
|
25 |
| -The official project documentation is available **[on the API Platform website](https://api-platform.com)**. |
26 | 9 |
|
27 |
| -API Platform embraces open web standards and the |
28 |
| -[Linked Data](https://www.w3.org/standards/semanticweb/data) movement. Your API will automatically expose structured data. |
29 |
| -It means that your API Platform application is usable **out of the box** with technologies of |
30 |
| -the semantic web. |
| 10 | +## Project structure |
31 | 11 |
|
32 |
| -It also means that **your SEO will be improved** because **[Google leverages these formats](https://developers.google.com/search/docs/guides/intro-structured-data)**. |
| 12 | +The project has been created from the [API Platform distribution folder](https://api-platform.com/docs/distribution/#installing-the-framework). All next.js application code is located in the "pwa" folder. The project is made with [the Next.js new app router](https://nextjs.org/docs/app). |
33 | 13 |
|
34 |
| -Last but not least, the server component of API Platform is built on top of the [Symfony](https://symfony.com) framework, |
35 |
| -while client components leverage [React](https://reactjs.org/) ([Vue.js](https://vuejs.org/) flavors are also available). |
36 |
| -It means that you can: |
37 | 14 |
|
38 |
| -* Use **thousands of Symfony bundles and React components** with API Platform. |
39 |
| -* Integrate API Platform in **any existing Symfony, React or Vue application**. |
40 |
| -* Reuse **all your Symfony and JavaScript skills**, benefit of the incredible amount of documentation available. |
41 |
| -* Enjoy the popular [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) (used by default, but fully optional: |
42 |
| - you can use the data provider you want, including but not limited to MongoDB and Elasticsearch) |
| 15 | +## 🤝 Contributors features |
43 | 16 |
|
44 |
| -## Install |
| 17 | +You need to use a valid github token to retrieve the list of contributors. |
| 18 | + |
| 19 | +1. Go to your [github developer settings](https://github.com/settings/tokens) |
| 20 | + |
| 21 | +2. Select scopes `public_repo`, `read:org` and `read:user`, generate the token and copy it. |
| 22 | + |
| 23 | +3. If you use "pnpm dev" on the folder pwa to launch the project, add a new `.env.local` file on the root of pwa folder, and set your token as an environment variable named `GITHUB_KEY`. |
| 24 | + |
| 25 | + |
| 26 | +If you use docker, create a file "secret_github_key" at the root of the project with your token inside : |
| 27 | +```sh |
| 28 | +# Create the secret_github_key file |
| 29 | +echo "YOUR_GITHUB_TOKEN" > secret_github_key |
| 30 | + |
| 31 | +``` |
| 32 | + |
| 33 | +> **❗Core team badges restriction**: You need to be a member of API Platform organization to retrieve API Platform teams. You can still locally launch the project, but the badges of the core team members will not appear. |
| 34 | +
|
| 35 | +## Installation and usage |
| 36 | + |
| 37 | +### with docker |
| 38 | + |
| 39 | +```sh |
| 40 | +# Checkout project |
| 41 | +git clone https://github.com/api-platform/website.git |
| 42 | + |
| 43 | +# Change directory |
| 44 | +cd website |
| 45 | + |
| 46 | +# Create the github_key file |
| 47 | +echo YOUR_GITHUB_TOKEN > secret_github_key |
| 48 | + |
| 49 | +# Install and run the project locally |
| 50 | +docker compose up -d |
| 51 | +> Go to http://localhost |
| 52 | + |
| 53 | +``` |
| 54 | + |
| 55 | +### without docker |
| 56 | + |
| 57 | +```sh |
| 58 | +# Checkout project |
| 59 | +git clone https://github.com/api-platform/website.git |
| 60 | + |
| 61 | +# Change directory |
| 62 | +cd website/pwa |
| 63 | + |
| 64 | +# Install dependencies |
| 65 | +pnpm install |
| 66 | + |
| 67 | +# Launch prebuild script (necessary to create some images variants like wallpapers or logos) |
| 68 | +pnpm prebuild |
| 69 | + |
| 70 | +# Run project locally (for development) |
| 71 | +pnpm dev |
| 72 | +> Go to http://localhost:3000/ |
| 73 | + |
| 74 | + |
| 75 | +``` |
| 76 | + |
| 77 | +## Build the project locally |
| 78 | + |
| 79 | +### with docker |
| 80 | + |
| 81 | +```sh |
| 82 | + |
| 83 | +# TO COMPLETE |
| 84 | + |
| 85 | +``` |
| 86 | + |
| 87 | + |
| 88 | +### without docker |
| 89 | + |
| 90 | +```sh |
| 91 | + |
| 92 | +# Build the project (for production) from the pwa folder |
| 93 | +pnpm build |
| 94 | + |
| 95 | +# Test the built project locally |
| 96 | +pnpm start |
| 97 | +> Go to http://localhost:3000 |
| 98 | + |
| 99 | +``` |
| 100 | + |
| 101 | +## Publishing Docs For New Versions |
| 102 | + |
| 103 | +1. Create a branch for the new version [in the `api-platform/docs` repository](https://github.com/api-platform/docs). |
| 104 | +2. Update [`consts.ts`](./pwa/consts.ts) |
| 105 | +3. Update [Algolia crawler configuration](https://crawler.algolia.com/admin/crawlers/23316da5-88e8-4a30-ab16-d5ec5bd9133f/configuration/edit) |
45 | 106 |
|
46 |
| -[Read the official "Getting Started" guide](https://api-platform.com/docs/distribution). |
47 | 107 |
|
48 |
| -## Credits |
49 | 108 |
|
50 |
| -Created by [Kévin Dunglas](https://dunglas.fr). Commercial support available at [Les-Tilleuls.coop](https://les-tilleuls.coop). |
|
0 commit comments