Skip to content

Commit 022ce7f

Browse files
committed
chore: set nhost in same folder as front-end
1 parent b71a5ba commit 022ce7f

File tree

139 files changed

+55
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+55
-370
lines changed
File renamed without changes.
File renamed without changes.

Diff for: .gitignore

+34-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
1-
# Logs
2-
logs
3-
*.log
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
423
npm-debug.log*
524
yarn-debug.log*
625
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
9-
.nhost
10-
11-
node_modules
12-
dist
13-
dist-ssr
14-
*.local
15-
16-
# Editor directories and files
17-
.vscode/*
18-
!.vscode/extensions.json
19-
.idea
20-
.DS_Store
21-
*.suo
22-
*.ntvs*
23-
*.njsproj
24-
*.sln
25-
*.sw?
26-
.nhost
27-
web/node_modules
28-
node_modules
29-
functions/node_modules
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Nhost
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

-202
Original file line numberDiff line numberDiff line change
@@ -1,202 +0,0 @@
1-
https://user-images.githubusercontent.com/20285232/181749889-24593a54-2847-466c-8f73-6b3f754ad303.mp4
2-
3-
# Nhost Netlify Starter Template (nextjs-reactquery-graphql)
4-
5-
This is an example front-end for the multi-conference example app created with Nhost. It uses Next.js, React-Query, Tailwind, and Nhost as a backend (authentication, postgres database, graphql api) and Netlify to host the front-end. This is an example front-end for the confere example app. It uses nextjs, react-query, tailwind, and nhost as a backend (authentication, postgres database, graphql api).
6-
7-
- [Getting Started](#getting-started)
8-
- [Deploy to Nhost](#deploy-to-nhost)
9-
10-
## Getting Started
11-
12-
<details><summary><h6>Steps for setting up local development</h6></summary>
13-
14-
<p>
15-
1. Clone the repository
16-
17-
```sh
18-
git clone https://github.com/nhost/nhost
19-
cd nhost
20-
```
21-
22-
2. Install the dependencies
23-
24-
```sh
25-
yarn install
26-
```
27-
28-
3. Terminal 1: Start Nhost
29-
30-
```sh
31-
nhost dev
32-
```
33-
34-
4. Terminal 2: Start the Vue application
35-
36-
```sh
37-
yarn dev
38-
```
39-
40-
</p>
41-
</details>
42-
43-
<details><summary><h6>Project structure walkthrough<h6></summary>
44-
45-
Inside this folder you are going to see both the specification for the backend (Nhost) and the front-end (Vue):
46-
47-
```
48-
/
49-
├── nhost/
50-
├── .nhost/
51-
├── public/
52-
│ └── favicon.ico
53-
├── src/
54-
│ ├── components/
55-
│ │ └── ...vue
56-
│ └── pages/
57-
│ └── IndexPage.vue
58-
└── package.json
59-
```
60-
61-
</details>
62-
63-
<details><summary><h6>GraphQL API Schema and Example Queries</h6></summary>
64-
<p>
65-
66-
```graphql
67-
query ConferencesQuery {
68-
conferences(where: {featured: {_eq: true}}) {
69-
id
70-
name
71-
speakers {
72-
name
73-
}
74-
talks {
75-
name
76-
speaker {
77-
name
78-
bio
79-
}
80-
}
81-
}
82-
}
83-
```
84-
85-
```graphql
86-
query Speakers {
87-
speakers {
88-
id
89-
name
90-
bio
91-
social
92-
job_description
93-
avatar_url
94-
}
95-
}
96-
```
97-
98-
```graphql
99-
query Talks {
100-
talks {
101-
id
102-
name
103-
start_date
104-
end_date
105-
speaker {
106-
name
107-
}
108-
}
109-
}
110-
```
111-
112-
</p>
113-
</details>
114-
115-
## Deploy to Nhost
116-
117-
<img align="left" width="40%" src="https://user-images.githubusercontent.com/20285232/181691897-1269d9d3-94fb-4958-ac27-83a70ab00309.png" >
118-
119-
[Nhost](https://nhost.io/) is an open source Firebase alternative with GraphQL. Nhost is doing for the backend, what Netlify and Vercel are doing for the frontend. More importantly, by creating a project with Nhost you automatically get the following:
120-
~~~
121-
- Database: PostgreSQL.
122-
- Instant GraphQL API: Hasura.
123-
- Authentication: Hasura Auth.
124-
- Storage: Hasura Storage.
125-
- Serverless Functions: AWS Lambdas.
126-
~~~
127-
128-
<details><summary><h6>Steps for creating an Nhost application</h6></summary>
129-
130-
Log in to your Nhost dashboard and click the **Create your first app** button.
131-
132-
<p align="center" width="100%">
133-
<img width="55%"" src="https://docs.nhost.io/assets/images/create-app-step-1-64d13fc87fac1d0989da25857e1c3811.png">
134-
</p>
135-
136-
Next, give your new Nhost app a name, select a geographic region for your Nhost services and click Create App.
137-
138-
<p align="center" width="100%">
139-
<img width="55%"" src="https://docs.nhost.io/assets/images/create-app-step-2-823c33a87887cbe28da98a85219dcc59.png">
140-
</p>
141-
142-
After a few seconds, you should get a PostgreSQL database, a GraphQL API with Hasura, file storage, and authentication set up.
143-
144-
</details>
145-
<details><summary><h6>Connecting this repository to Nhost</h6></summary>
146-
Nhost supports a git-based workflow which means that you can safely work locally with the CLI and when you are ~~confident~~ with your changes, you can push to your repository and your application will be automatically deployed (any following updates you push to your code will also be automatically be deployed.) To allow this, you need to connect this repository to your Nhost projects through the Nhost console:
147-
148-
1. Fork/clone this repository to your GitHub account.
149-
150-
2. Provide the require permissions to select this repository to the official Nhost GitHub application.
151-
152-
3. Find your repository on the Nhost Console & connect it:
153-
154-
<p align="center" width="100%">
155-
<img width="55%"" src="https://user-images.githubusercontent.com/20285232/181070306-851187ca-6595-4cdc-b458-b62b479479db.png">
156-
</p>
157-
158-
4. Once connected, the application will automatically deploy.
159-
160-
<p align="center" width="100%" height="100%">
161-
<img width="55%"" src="https://user-images.githubusercontent.com/20285232/181070624-f12571a4-6b77-4a2f-acab-9e156306b392.png">
162-
</p>
163-
164-
5. Add changes to your application. Any changes you push to your repository will also be automatically be deployed (you can see your deployments on the "Deployments" section of the console)
165-
166-
167-
<p align="center" width="100%">
168-
<img width="55%"" src="https://user-images.githubusercontent.com/20285232/181070633-c3c67e94-981c-4574-954b-c643448f387e.png">
169-
</p>
170-
171-
</p>
172-
</details>
173-
174-
## Deploy to Netlify
175-
176-
<details><summary><h6>Steps for deploying this template to Netlify</h6></summary>
177-
178-
1. Clone this repo: ``
179-
2. Make sure you are in the correct directory and run`yarn install` (or `npm install`.)
180-
3. Run `yarn dev` (or `npm run dev`.)
181-
4. Make your desired changes to the front-end.
182-
5. Provide the necessary permissions to the Netlify application for your GitHub repository.
183-
6. Add the correct environment variables from your Nhost application:
184-
185-
```
186-
NEXT_PUBLIC_NHOST_SUBDOMAIN=YOUR_NHOST_APP_SUBDOMAIN
187-
NEXT_PUBLIC_NHOST_REGION=YOUR_NHOST_APP_REGION
188-
```
189-
190-
You can select these variables from your app overview:
191-
192-
<p align="center" width="100%">
193-
<img width="50%"" src="https://user-images.githubusercontent.com/20285232/181790261-065d7e61-6986-4acc-94d7-5a7f828da76d.png">
194-
</p>
195-
196-
Add the variables to your Netlify Deployment:
197-
198-
<p align="center" width="100%">
199-
<img width="50%"" src="https://user-images.githubusercontent.com/20285232/181789867-ebd6a197-8125-47a1-9bd1-8f8f01e24f29.png">
200-
</p>
201-
</details>
202-

Diff for: conference/README.md

-105
This file was deleted.

0 commit comments

Comments
 (0)