On branch main

Your branch is up to date with 'origin/main'.

Changes to be committed:
	modified:   index.html
	modified:   src/App.jsx
	new file:   src/components/FileUploader/FileUploader.css
	new file:   src/components/FileUploader/FileUploader.jsx
	new file:   sveege-notes-db/.github/copilot-instructions.md
	new file:   sveege-notes-db/.gitignore
	new file:   sveege-notes-db/README.md
	new file:   sveege-notes-db/manifest.yml
	new file:   sveege-notes-db/package-lock.json
	new file:   sveege-notes-db/package.json
This commit is contained in:
Derek Holodak
2025-09-13 12:43:34 -04:00
parent 76b063a264
commit e56dc7c59c
10 changed files with 7263 additions and 21 deletions

View File

@@ -3,11 +3,31 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<!-- Font Awesome -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
rel="stylesheet"
/>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
rel="stylesheet"
/>
<!-- MDB -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/9.1.0/mdb.min.css"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title> <title>Sveege Notes</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="/src/main.jsx"></script> <script type="module" src="/src/main.jsx"></script>
<!-- MDB -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/9.1.0/mdb.umd.min.js"
></script>
</body> </body>
</html> </html>

View File

@@ -2,32 +2,14 @@ import { useState } from 'react'
import reactLogo from './assets/react.svg' import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg' import viteLogo from '/vite.svg'
import './App.css' import './App.css'
import FileUploader from './components/FileUploader/FileUploader'
function App() { function App() {
const [count, setCount] = useState(0) const [count, setCount] = useState(0)
return ( return (
<> <>
<div> <FileUploader />
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</> </>
) )
} }

View File

@@ -0,0 +1,17 @@
import React from 'react'
const FileUploader = () => {
return (
<>
<form>
<div data-mdb-input-init className="mb-4">
<label for="formFileMultiple" class="form-label">Upload photos of your handwritten notes</label>
<input class="form-control" type="file" id="formFileMultiple" multiple />
</div>
<button data-mdb-ripple-init type="button" class="btn btn-primary btn-block mb-4">Digitize</button>
</form>
</>
)
}
export default FileUploader

View File

@@ -0,0 +1,57 @@
**Prompt for Expert Manifest Developer**
**You are an assistant for app creation. You are going to use the backend Manifest. The apps you generate are light and for demo purposes: you not aim to provide all the data structure but instead showcase a variety of property types.**
**Install**
When asked to create a backend, execute the following actions:
1. Install the `manifest` npm package. Always use the last version (>4). Do not install `express` or other dependencies.
2. Add the following scripts to `package.json`: "start": "node node_modules/manifest/scripts/watch/watch.js" and "seed": "node node_modules/manifest/dist/manifest/src/seed/scripts/seed.js"
3. Create the `manifest.yml` file and add the manifest code to it.
4. Add the `redhat.vscode-yaml` as recommendation in `.vscode/extensions.json`
5. Add the following `yaml.schemas`: `"https://schema.manifest.build/schema.json": "**/manifest.yml"` in `.vscode/settings.json`
**Backend file**
On the `manifest.yml`, follow those rules:
- Strictly follow the Manifest JSON Schema: https://schema.manifest.build/schema.json
- Start by adding a quick name to the app
- Start by creating few entities with few properties
- Try to showcase different property types
- Only use validation properties once or twice
- No entity should be called admin
- Add an emoji after each entity name, but do not use the emoji it on relationships references
- Add a linebreak before each entity object
- Each entity only appears once. Relationships goes just below the properties, do not repeat the entity name.
- Do not use special characters.
- Use YAML abbreviated form for objects, with spaces. Example: { name: issueDate, type: date }
- Do not add relationships to single entities
- For relationships, use the short form. Ex: ' belongsTo: - Author' if possible
- Add policies. Most projects only have "read" public policies. Some projects have "create" public policies when anyone can post (contact forms submissions, comments, etc.)
- If using the "choice" property type, use "options.values" property to list choices. Example: `{ name: type, type: choice, options: { values: ["Fire", "Water", "Grass"] } }`
- Do not add "seedCount" and "mainProp" to entities if not asked
**Connecting to a frontend**
- When asked to create a full-stack app, or to add a frontend, the best way is to follow a monorepo structure with 2 folders: "server" and "client".
- Make sure that you read the OpenAPI specification located at `./manifest/openapi.yml` and generated when running Manifest. It contains all the available endpoints with available parameters and schemas and the API base url.
- You can copy the types generated at `./manifest/types.ts` in the "client" folder. They will also be generated when running Manifest.
**Documentation**
Refer to the Manifest documentation: https://manifest.build/docs
**Example**
This is an example of the content of a `manifest.yml` file:
name: My pet app 🐾
entities:
Owner:
properties: - name - { name: birthdate, type: date }
Cat:
properties: - name - { name: age, type: number } - { name: birthdate, type: date }
belongsTo: - Owner
Homepage:
nameSingular: Home content
single: true
properties: - title - { name: description, type: richText } - { name: cover, type: image }

5
sveege-notes-db/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
node_modules
.env
public
.manifest

50
sveege-notes-db/README.md Normal file
View File

@@ -0,0 +1,50 @@
<br>
<p align="center">
<a href="https://manifest.build/#gh-light-mode-only">
<img alt="manifest" src="https://manifest.build/assets/images/logo-transparent.svg" height="55px" alt="Manifest logo" title="Manifest - A backend so simple that it fits in a YAML file" />
</a>
<a href="https://manifest.build/#gh-dark-mode-only">
<img alt="manifest" src="https://manifest.build/assets/images/logo-light.svg" height="55px" alt="Manifest logo" title="Manifest - A backend so simple that it fits in a YAML file" />
</a>
</p>
<p align='center'>
<strong>1-file backend to ship fast</strong> <br> <span>Manifest is an open source, portable backend with data, storage, logic, auth and admin UI to ship Prototypes and MVPs.
</span>
## Description
Welcome to your [Manifest](https://github.com/mnfst/manifest) project ! Feel free to replace this README by your own.
## Installation
```bash
$ npm install
```
## Running the app
To run the app in the development mode:
```bash
npm run start
```
- Open [http://localhost:1111](http://localhost:1111) to open your admin UI it in your browser
- Open [http://localhost:1111/api](http://localhost:111/api) to view your REST API documentation
The page will reload when you make changes.
## Seed dummy data
Seeds some dummy data for your entities:
```bash
npm run seed
```
## Community & Resources
- [Docs](https://manifest.build/docs) - Get started with Manifest
- [Discord](https://discord.gg/FepAked3W7) - Come chat with the community
- [Github](https://github.com/mnfst/manifest/issues) - Report bugs and share ideas to improve the product.

View File

@@ -0,0 +1,60 @@
# This is a sample file for a manifest.yml manifest backend.
# Read more about the manifest format here: https:/manifest.build/docs
name: Sveege Notes
entities:
Note:
properties:
- name
- { name: text, type: richText }
- { name: createdOn, type: timestamp }
belongsTo:
- User
belongsToMany:
- Image
policies:
create:
- { access: restricted, allow: User, condition: self }
read:
- { access: restricted, allow: User, condition: self }
update:
- { access: restricted, allow: User, condition: self }
delete:
- { access: restricted, allow: User, condition: self }
Image:
mainProp: id
properties:
- { name: photo, type: image, options: { sizes: { small: { height: 90, width: 90 }, large: { width: 200 } } } }
- { name: name, type: text }
- { name: uploadedOn, type: timestamp }
belongsTo:
- Note
policies:
create:
- { access: restricted, allow: User, condition: self }
read:
- { access: restricted, allow: User, condition: self }
update:
- { access: restricted, allow: User, condition: self }
delete:
- { access: restricted, allow: User, condition: self }
User:
authenticable: true
properties:
- name
policies:
read:
- access: public
Homepage:
nameSingular: Home content
single: true
properties:
- title
- { name: description, type: richText }
- { name: cover, type: image }
policies:
read:
- access: public

7037
sveege-notes-db/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
{
"name": "sveege-notes-db",
"version": "0.1.0",
"description": "A backend made with Manifest: https://manifest.build",
"private": true,
"license": "UNLICENSED",
"scripts": {
"start": "node node_modules/manifest/scripts/watch/watch.js",
"seed": "node node_modules/manifest/dist/manifest/src/seed/scripts/seed.js"
},
"dependencies": {
"manifest": "^4.17.7"
}
}