|
| 1 | +<p align="center"> |
| 2 | + <a href="https://js.ipfs.io" title="JS IPFS"> |
| 3 | + <img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" /> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<h3 align="center"><b>IPFS Next App</b></h3> |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | + <b><i>Using js-ipfs in a `create-next-app`</i></b> |
| 11 | + <br /> |
| 12 | + <br /> |
| 13 | + <img src="https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png" width="200"> |
| 14 | + <br> |
| 15 | + <a href="https://github.com/ipfs/js-ipfs/tree/master/docs">Explore the docs</a> |
| 16 | + · |
| 17 | + <a href="https://codesandbox.io/">View Demo</a> |
| 18 | + · |
| 19 | + <a href="https://github.com/ipfs/js-ipfs/issues">Report Bug</a> |
| 20 | + · |
| 21 | + <a href="https://github.com/ipfs/js-ipfs/issues">Request Feature</a> |
| 22 | + </p> |
| 23 | + |
| 24 | +## Table of Contents |
| 25 | + |
| 26 | +- [Table of Contents](#table-of-contents) |
| 27 | +- [About The Project](#about-the-project) |
| 28 | +- [Getting Started](#getting-started) |
| 29 | + - [Pre requisites](#pre-requisites) |
| 30 | + - [Installation and Running example](#installation-and-running-example) |
| 31 | + - [Available Scripts](#available-scripts) |
| 32 | + - [`npm start`](#npm-start) |
| 33 | + - [`npm run build`](#npm-run-build) |
| 34 | +- [Usage](#usage) |
| 35 | + - [Learn More](#learn-more) |
| 36 | + - [Deploy on Vercel](#deploy-on-vercel) |
| 37 | +- [Documentation](#documentation) |
| 38 | +- [Contributing](#contributing) |
| 39 | +- [Want to hack on IPFS?](#want-to-hack-on-ipfs) |
| 40 | + |
| 41 | +## About The Project |
| 42 | + |
| 43 | +- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs) |
| 44 | +- Look into other [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser |
| 45 | +- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node |
| 46 | +- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it |
| 47 | +- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs |
| 48 | +- Check out https://docs.ipfs.io for tips, how-tos and more |
| 49 | +- See https://blog.ipfs.io for news and more |
| 50 | +- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io |
| 51 | + |
| 52 | +## Getting Started |
| 53 | + |
| 54 | +### Pre requisites |
| 55 | + |
| 56 | +Make sure you have installed all of the following prerequisites on your development machine: |
| 57 | + |
| 58 | +- Git - [Download & Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed. |
| 59 | +- Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager. |
| 60 | + |
| 61 | +### Installation and Running example |
| 62 | + |
| 63 | +```console |
| 64 | +> npm install |
| 65 | +> npm start |
| 66 | +``` |
| 67 | + |
| 68 | +Now open your browser at `http://localhost:3000` |
| 69 | + |
| 70 | +### Available Scripts |
| 71 | + |
| 72 | +In the project directory, you can run: |
| 73 | + |
| 74 | +#### `npm start` |
| 75 | + |
| 76 | +Runs the app in the development mode.<br> |
| 77 | +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 78 | + |
| 79 | +The page will reload if you make edits.<br> |
| 80 | +You will also see any lint errors in the console. |
| 81 | + |
| 82 | +#### `npm run build` |
| 83 | + |
| 84 | +Builds the app for production to the `dist` folder.<br> |
| 85 | +It correctly bundles in production mode and optimizes the build for the best performance. |
| 86 | + |
| 87 | +## Usage |
| 88 | + |
| 89 | +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) integrated with `js-ipfs`. |
| 90 | + |
| 91 | +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. |
| 92 | + |
| 93 | +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. |
| 94 | + |
| 95 | +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
| 96 | + |
| 97 | +### Learn More |
| 98 | + |
| 99 | +To learn more about Next.js, take a look at the following resources: |
| 100 | + |
| 101 | +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
| 102 | +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 103 | + |
| 104 | +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 105 | + |
| 106 | +### Deploy on Vercel |
| 107 | + |
| 108 | +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 109 | + |
| 110 | +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 111 | + |
| 112 | +_For more examples, please refer to the [Documentation](#documentation)_ |
| 113 | + |
| 114 | +## Documentation |
| 115 | + |
| 116 | +- [Config](https://docs.ipfs.io/) |
| 117 | +- [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |
| 118 | +- [Examples](https://github.com/ipfs/js-ipfs/tree/master/examples) |
| 119 | +- [Development](https://github.com/ipfs/js-ipfs/blob/master/docs/DEVELOPMENT.md) |
| 120 | + |
| 121 | +## Contributing |
| 122 | + |
| 123 | +Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
| 124 | + |
| 125 | +1. Fork the IPFS Project |
| 126 | +2. Create your Feature Branch (`git checkout -b feature/amazing-feature`) |
| 127 | +3. Commit your Changes (`git commit -a -m 'feat: add some amazing feature'`) |
| 128 | +4. Push to the Branch (`git push origin feature/amazing-feature`) |
| 129 | +5. Open a Pull Request |
| 130 | + |
| 131 | +## Want to hack on IPFS? |
| 132 | + |
| 133 | +[](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) |
| 134 | + |
| 135 | +The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out: |
| 136 | + |
| 137 | +Read the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md). |
| 138 | + |
| 139 | +- **Check out existing issues** The [issue list](https://github.com/ipfs/js-ipfs/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/js-ipfs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/js-ipfs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge |
| 140 | +- **Look at the [IPFS Roadmap](https://github.com/ipfs/roadmap)** This are the high priority items being worked on right now |
| 141 | +- **Perform code reviews** More eyes will help |
| 142 | + a. speed the project along |
| 143 | + b. ensure quality, and |
| 144 | + c. reduce possible future bugs. |
| 145 | +- **Add tests**. There can never be enough tests. |
| 146 | +- **Join the [Weekly Core Implementations Call](https://github.com/ipfs/team-mgmt/issues/992)** it's where everyone discusses what's going on with IPFS and what's next |
0 commit comments