Giter Site home page Giter Site logo

spark-dotnet / framework Goto Github PK

View Code? Open in Web Editor NEW
696.0 696.0 53.0 1.35 MB

Build production ready, full-stack web applications fast without sweating the small stuff.

Home Page: https://spark-framework.net/

License: MIT License

HTML 23.85% C# 69.82% CSS 2.85% JavaScript 3.48%

framework's People

Contributors

andrewjesse avatar caio-basso avatar jonhilt avatar karlsenpcsoft avatar kevingolding2001 avatar mariobot avatar simcon avatar skyfallwastaken avatar westonwalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework's Issues

spark new [appname] --css bootstrap Not Working

Hi there I am trying to use
spark new [appname] --css bootstrap
Command it is not working.

Is it removed from the the spark CLI. Video is for reference for that case.

SparkCSS.mp4

Also in source code i found out that there is no any configuration for --css Link

Could you please help me.

Careful when naming your App folder

While following the steps in the documentation, instead of using spark new MyApp I used some '-' (dash) to name my app folder.

Spent some time trying to figure out what the error was, because I could't use dotnet watch from the beginning.

So be careful when naming your app folder, don't use dashes.

Install error

dotnet tool install --global BlazorSpark.Console -> I Runned this and it's installed
spark install. -> this does not work, do I have to install something else before running this command? also at whcih directory do I run it? I'm on a macbook
spark new MyApp

OAuth / SSO integration

Hey Spark Team,

Just a note to say how much I'm enjoying working with Spark. You folks have seriously knocked it out of the park!

So, here's a thought. What if Spark had OAuth and SSO support? Over at Plainfield School District 202, we're hooked on Microsoft's authentication system. If we could get that sort of integration with Spark, it would be a game changer for us.

And I don't think it's just us. I can see loads of devs getting excited about spinning up secure, internal apps with OAuth and SSO support. Feels like it could be a real boost to what Spark already offers.

I get that this is a big ask. I'm just putting it out there, and I'm more than willing to talk about it or explore other ways we might get the same benefits.

Once again, kudos on an amazing job with Spark. This is just a way we might be able to kick it up a notch.

Thanks for considering my suggestion! I've added it here as a GitHub issue for better tracking.

Is only for SSR mode?

I just serach Blazor framework to use, But I like this framework it looks like simple and wonderful.

I saw the doc, it only mentioned SSR, I don't know if use auto render or Webassembly render is work?

API Template Request

May I request for an API template? I mainly use .NET to build APIs only and use other frameworks for the frontend.

This was a thing before 1.0 but now we only have Blazor and Razor pages.

Thanks!

Local IIS or Web SharkHost not working

Hello.
A fresh spark install, even without db migration dosent work, i get error HTTP Error 500.30 on local IIS or Shared Webhost.
I used the default .ENV file without change anything.

Everything works fine if i run the app on visualstudio

EventViewer:
Application: w3wp.exe
CoreCLR Version: 7.0.923.32018
.NET Version: 7.0.9
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Invalid database driver. Check your .env file and make sure the DB_CONNECTION variable is set to mysql, sqlite, postgres, or sqlserver.
at Spark.Library.Database.DatabaseServiceRegistration.AddDatabase[T](IServiceCollection services, IConfiguration config)
at SimpleSpark.Application.Startup.AppServiceRegistration.AddAppServices(IServiceCollection services, IConfiguration config) in C:\Lixo\SimpleSpark\Application\Startup\AppServiceRegistration.cs:line 23
at Program.

$(String[] args) in C:\Lixo\SimpleSpark\Program.cs:line 12

Introducing a Discord or Slack channel

Having a Discord or Slack channel for Spark could foster a strong, collaborative community around the project. It would provide a real-time platform for users and contributors to ask questions, share ideas, troubleshoot issues, and get to know each other, thereby accelerating problem-solving and innovation. Additionally, such a channel could improve onboarding of new contributors, making it easier for them to understand the project and start contributing effectively.

Styles are missing from my site

Hi, I'm trying out Spark and followed the steps in the tutorial, however my site has no styling:
image
I'm running the site using dotnet watch, and am also running Vite's development server in the background, using vite dev.

My dotnet watch command is also spamming the console with this:

[17:42:40 WRN] The SSL connection could not be established, see inner exception.. Make sure the Vite development server is running
[17:42:40 WRN] The SSL connection could not be established, see inner exception.. Make sure the Vite development server is running
[17:42:40 WRN] The SSL connection could not be established, see inner exception.. Make sure the Vite development server is running

It also said this at the start

[17:42:35 INF] Looks like the Vite development server is already running at https://localhost:5173.
[17:42:35 INF] This is the homepage.
[17:42:35 INF] HTTP GET / responded 200 in 430.0760 ms
[17:42:35 INF] HTTP GET /_framework/blazor.web.js responded 304 in 17.6418 ms
[17:42:40 WRN] The Vite development server did not start within 5 seconds
[17:42:40 WRN] The Vite development server did not start within 5 seconds
[17:42:40 WRN] The Vite development server did not start within 5 seconds

(For reference, I started Vite before running dotnet watch because it didn't autostart)

.net 8 support

Hi there,
When are you planning to support .net 8? Thanks.

Is there any plan for adding model CRUD CLI feature?

If you add model scaffolding features (like create/update/delete page generation) into the CLI command then it will be very helpful and development will be faster. I can suggest more features like

  1. Redis Cashe support
  2. Logging into external sources like ELK
  3. CQRS support
  4. Audatible model
  5. Load-balancing-friendly project ( so that your project can work perfectly when we run them in multiple worker processes and multiple servers as well)
  6. Dynamic authorization ( so that user can create their own Role by selecting each controller action )
  7. API project template ( seen that already have a pull request )
  8. Themeing support
  9. API exposing from the project with OAuth2/JWT security
  10. Module/Plugins support

Unable to create a new migration

I'm stepping through the "Basics" section in the documentation, and I created a new model called "Book". It successfully created the model class, and I added the corresponding DbSet property to the DbContext. When I try to create a migration for it, I get the following error. Also, there is no migration file created that I can find.

I noticed that the "Migrations" folder was missing after I created the blazor spark project. I tried manually adding the directory, but it still didn't work.

image

Install template wont work

To replicate issue just run 'spark install' before manually installing the BlazorSpark template. It would gives an error but still shows that the installation was success. Spark wont work unless you manually install the template.

image

The issue is that in InstallSparkCommand.cs line 16, '--' is missing from the install command.

CreatedAt not set in SQLite

Hello, I've only tested it with SQlite but the CreatedAT field isn't putting the current date - it's empty. It should be automatic, shouldn't it? Just as ModifyAt should also change automatically on Updates.

How to Folder Publish after Vite has been added to the solution?

I am using Visual Studio 2022 Preview. When I run the site in debug mode it works/displays as it should. But if I Publish it to a folder to use with IIS the .js and .css files are not found.

The same problem can be reproduced running in debug mode by going into the .env file and changing ASPNETCORE_ENVIRONMENT=Development
to
ASPNETCORE_ENVIRONMENT=Production

I am new to Vite and haven't found the solution to this yet.

Thanks for your help/time

How can I enable Password restrictions?

I see this is in Appsettings but it seems to be ignored.

Can you give me a clue where in your Identity code I can add these options?

"Password": {
               "RequiredLength": 8,
               "RequireDigit": true,
               "RequireUppercase": false,
               "RequireNonAlphanumeric": false,
               "ResetExpires": 60
}

Thanks

Few questions and suggestions

Iยดm really interested in this project but would like to see few things

  • Summary of the things you have been sharing on Twitter
    • the philosophy behind the the framework and what sparked it etc.
  • High level roadmap for things to come and in what order you think they will be developed
  • What flavour of Blazor is this WASM/Server and even if its super early do we know how this will play with Blazor United?
  • Activate the Discussion tab for this repo for discussion like this ๐Ÿ˜…

I have downloaded and tested this since it is probably going to change a lot Iยดm not ready to go all in just yet ๐Ÿ˜† but would love to have more information.

Incorrect path to assets when published

The Vite component points to the assets folder but the vite config includes a 'build' folder.

I fixed this for now by updating the Vite razor component but this might be better fixed in the config.

eg.

else
{

<script type="module" src="/build/assets/app.js"></script>
}

External Auth Providers? MS/AzureAD

Any plans to add the built-in MS Identity auth provider support, not sure who uses local auth anymore, especially with lots of companies requiring MFA etc that can be all configured on the auth provider as well as not need to manage removing access on termination since it's tied to the external provider.

No support.

There is really no effective support for this platform. I wish creators would stop producing platforms that just lead down a dead end road.

Weston, if we can't get timely answers to legitimate questions then what's the point?

Just over it.

"Could not execute because the specified command or file was not found." error when making/running a migration

Here is the output when you run spark make migration User

Creating a new migration

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-ef does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

--------------------------------------------------------------------------------------------
Spark migration User created

To be honest I probably didn't install .NET correctly Turns out I forgot to install dotnet-ef, but it still shouldn't say that it was created.

Dashes in Project Name leave VS unable to load project file

When I use a dash in the project name it doesn't add the correct name for the .csproj file to the .sln file. For example, the project name: "Spark-App". The project file is created as intended, "Spark-App.csproj", but the .sln file contains "Spark_App.csproj" which causes spark open to launch VS and then VS cannot find the csproj file and it fails to load the solution.

Reproduce by:

  1. Running spark new Spark-App
  2. Change into directory: cd Spark-App
  3. Run spark open

"spark make page <name>" file structure inconsistent with template

Hi,

Minor thing I just noticed: When creating a new page with spark make page Profile/Settings, it would create two new files Profile/Settings.razor and Profile/Settings.cs.
But that is a different naming than the ones that was created with the templates. Those files would be named something like Profile/Settings.razor and Profile/Settings.razor.cs, so it also adds the .cs file "under" (as a "fold out" file) the .razor file.

I think this should be easy to fix, and would make file creations more streamlined.

/Pelle

Error creating a db migration

Fresh installation with the below steps on win11 / dotnet 8

dotnet tool install --global Spark.CLI
spark install
spark new MyApp
...
  • Then tried to create a migration and get some ambiguous output,
$ spark make migration x

Creating a new migration

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-ef does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

--------------------------------------------------------------------------------------------
Spark migration x created

image

`Error: read EIO` when making User migration

I ran spark make migration User, but got this error:

~/Chirper
spark make migration User
node:events:498
      throw er; // Unhandled 'error' event
      ^

Error: read EIO
    at TTY.onStreamRead (node:internal/stream_base_commons:218:20)
Emitted 'error' event on Interface instance at:
    at ReadStream.onerror (node:internal/readline/interface:239:10)
    at ReadStream.emit (node:events:520:28)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -5,
  code: 'EIO',
  syscall: 'read'
}

Node.js v22.2.0

Running:

  • .NET 8.0.102
  • dotnet-ef 8.0.5
  • Nobara 39. with kernel Linux 6.8.7-201.fsync.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC TKG

Improved documentation: Spark migration command

In the documentation, where it demonstrates how to perform the migration with the spark command, for those who do not have 'dotnet-ef' installed, the command will not work.

image

It would be interesting to warn about this point. Maybe leave the link to 'https://learn.microsoft.com/en-us/ef/core/cli/dotnet' or put the command:

dotnet tool install --global dotnet-ef

I'm on a new pc, and I ended up facing this problem, even though I try to be familiar with ef-dotnet, it took me a while to understand what was missing ๐Ÿ˜‚๐Ÿ˜‚

By the way, excellent job!๐Ÿ‘

About section is blank

It would look really nice to have an About section, especially so it has a description when it's pinned on my profile home page:)

Here are a couple suggestions for the About section:
"Easily construct comprehensive Blazor Server applications using Blazor Spark, our versatile open-source framework."
"Quickly build a full-stack Blazor Server application with this open-source Blazor framework"

image

What's the future of Spark?

Firstly, I want to make it clear that I mean to put no pressure or anything at all, OSS is OSS and anyone can contribute.

However, Spark doesn't seem to have much activity now. Is it because Spark is basically finished, or is it because the idea's unviable, or is it just that you lost interest/don't have the time?

Thanks :)

Spark.Templates not found

I am using Spark for my new blazor project. I am not able to install the templates. Please check the attached image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.